msgenc: Fix OOB entry ID read when dumping to JSON (#835)

This commit is contained in:
Gudf 2025-11-24 20:30:20 +01:00 committed by GitHub
parent 192c170dfd
commit 42fa11ea88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -215,6 +215,7 @@ void Json::ToFile(MessagesConverter &converter) {
rapidjson::Value entry_name(rapidjson::kStringType);
if (it != id_strings.cend()) {
entry_name.SetString(it->c_str(), doc.GetAllocator());
it++;
} else {
sprintf(keybuf, "%s_%s", prefix.c_str(), row_no_buf);
entry_name.SetString(keybuf, doc.GetAllocator());
@ -246,7 +247,6 @@ void Json::ToFile(MessagesConverter &converter) {
messages.PushBack(entry, doc.GetAllocator());
IncRowNoBuf();
it++;
}
doc.AddMember("messages", messages, doc.GetAllocator());

View File

@ -11,7 +11,7 @@
#include "Options.h"
static const char* progname = "msgenc";
static const char* version = "2025.08.12";
static const char* version = "2025.11.24";
static inline void usage() {
cout << progname << " v" << version << endl;