mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
Fixed error outputs for CLang
This commit is contained in:
parent
6cef4eab4f
commit
264dd7a10d
@ -498,7 +498,7 @@ int CLangMngr::GetKeyEntry(String &key)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define CHECK_PTR(ptr, start, bufsize) if ((ptr) - (start) >= (bufsize)) { \
|
#define CHECK_PTR(ptr, start, bufsize) if ((ptr) - (start) >= (bufsize)) { \
|
||||||
AMXXLOG_Log("[AMXX] Buffer overflow in formatting (line %d, \"%s\")", amx->curline, g_plugins.findPluginFast(amx)->getName()); \
|
LogError(amx, AMX_ERR_STACKERR, "Buffer overflow in string formatting"); \
|
||||||
outbuf[0] = 0; \
|
outbuf[0] = 0; \
|
||||||
len = 0; \
|
len = 0; \
|
||||||
return outbuf; }
|
return outbuf; }
|
||||||
@ -509,7 +509,7 @@ int CLangMngr::GetKeyEntry(String &key)
|
|||||||
{ \
|
{ \
|
||||||
strcpy(outbuf, ""); \
|
strcpy(outbuf, ""); \
|
||||||
len = 0; \
|
len = 0; \
|
||||||
AMXXLOG_Log("[AMXX] Plugin did not format a string correctly (parameter %d (total %d), line %d, \"%s\")", parm, paramCount, amx->curline, g_plugins.findPluginFast(amx)->getName()); \
|
LogError(amx, AMX_ERR_PARAMS, "String formatted incorrectly - parameter %d (total %d)", parm, paramCount); \
|
||||||
return outbuf; \
|
return outbuf; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user