Replace ke::SafeSprintf with ke::SafeStrcpy (#784)
This commit is contained in:
committed by
Asher Baker
parent
0a91b1f5b1
commit
956f264b85
@@ -1171,18 +1171,12 @@ reswitch:
|
||||
int userid;
|
||||
if (!bridge->DescribePlayer(*value, &name, &auth, &userid))
|
||||
return pCtx->ThrowNativeError("Client index %d is invalid (arg %d)", *value, arg);
|
||||
ke::SafeSprintf(buffer,
|
||||
sizeof(buffer),
|
||||
"%s<%d><%s><>",
|
||||
name,
|
||||
userid,
|
||||
auth);
|
||||
|
||||
ke::SafeSprintf(buffer, sizeof(buffer), "%s<%d><%s><>", name, userid, auth);
|
||||
}
|
||||
else
|
||||
{
|
||||
ke::SafeSprintf(buffer,
|
||||
sizeof(buffer),
|
||||
"Console<0><Console><Console>");
|
||||
ke::SafeStrcpy(buffer, sizeof(buffer), "Console<0><Console><Console>");
|
||||
}
|
||||
if (!AddString(&buf_p, llen, buffer, width, prec, flags))
|
||||
return pCtx->ThrowNativeError("Escaped string would be truncated (arg %d)", arg);
|
||||
|
||||
Reference in New Issue
Block a user