mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
NetworkSystem: fix incorrect function parameter
nRead was incorrectly placed, it should've been in the parse call. This is used to process the string buffer at once since we already know the size of the string buffer.
This commit is contained in:
parent
5f5bbb9164
commit
5584c2a87f
@ -36,7 +36,7 @@ void CBanSystem::LoadList(void)
|
||||
pBuf[nRead] = '\0'; // Null terminate the string buffer containing our banned list.
|
||||
|
||||
rapidjson::Document document;
|
||||
if (document.Parse(pBuf.get()).HasParseError(), nRead)
|
||||
if (document.Parse(pBuf.get(), nRead).HasParseError())
|
||||
{
|
||||
Warning(eDLL_T::SERVER, "%s: JSON parse error at position %zu: %s\n",
|
||||
__FUNCTION__, document.GetErrorOffset(), rapidjson::GetParseError_En(document.GetParseError()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user