mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 06:45:37 +03:00
fixed bug at25056
This commit is contained in:
parent
e929dc55bd
commit
458f2acfe7
@ -713,7 +713,7 @@ do_copy:
|
|||||||
i++;
|
i++;
|
||||||
const char *start = had_quotes ? &(string[beg+1]) : &(string[beg]);
|
const char *start = had_quotes ? &(string[beg+1]) : &(string[beg]);
|
||||||
size_t _end = had_quotes ? (i==len-1 ? 1 : 2) : 0;
|
size_t _end = had_quotes ? (i==len-1 ? 1 : 2) : 0;
|
||||||
size_t end = (pos - _end > RightMax) ? RightMax : pos - _end;
|
size_t end = (pos - _end > LeftMax) ? LeftMax : pos - _end;
|
||||||
size_t to_go = end-beg;
|
size_t to_go = end-beg;
|
||||||
if (end && to_go)
|
if (end && to_go)
|
||||||
{
|
{
|
||||||
@ -721,7 +721,7 @@ do_copy:
|
|||||||
*left++ = (cell)*start++;
|
*left++ = (cell)*start++;
|
||||||
}
|
}
|
||||||
*left = '\0';
|
*left = '\0';
|
||||||
end = (len-i+1 > LeftMax) ? LeftMax : len-i+1;
|
end = (len-i+1 > RightMax) ? RightMax : len-i+1;
|
||||||
if (end)
|
if (end)
|
||||||
{
|
{
|
||||||
start = &(string[i]);
|
start = &(string[i]);
|
||||||
@ -735,7 +735,7 @@ do_copy:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//if we got here, there was nothing to break
|
//if we got here, there was nothing to break
|
||||||
set_amxstring(amx, params[2], &(string[beg]), params[3]);
|
set_amxstring(amx, params[2], &(string[beg]), LeftMax);
|
||||||
if (RightMax)
|
if (RightMax)
|
||||||
*right = '\0';
|
*right = '\0';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user