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:
Kawe Mazidjatari 2025-01-26 11:48:21 +01:00
parent 5f5bbb9164
commit 5584c2a87f

View File

@ -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()));