From 9ae82271f8dc01e32df1c76cfec64771bc5ee6d0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 3 Jan 2024 21:21:55 +0300 Subject: fixes #4095 completely, AMDG --- protocols/Discord/src/guilds.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/protocols/Discord/src/guilds.cpp b/protocols/Discord/src/guilds.cpp index 32bdd67cc8..fdaab2cefe 100644 --- a/protocols/Discord/src/guilds.cpp +++ b/protocols/Discord/src/guilds.cpp @@ -463,6 +463,7 @@ void CDiscordGuild::LoadFromFile() int fSize = ::filelength(fileNo); ptrA json((char*)mir_alloc(fSize + 1)); read(fileNo, json, fSize); + json[fSize] = 0; close(fileNo); JSONNode cached = JSONNode::parse(json); -- cgit v1.2.3