From 32e6a433e86771562f917c710101c5fb07c9096b Mon Sep 17 00:00:00 2001 From: nmzik Date: Wed, 16 Sep 2026 09:21:44 +0400 Subject: [PATCH] Fix Json2 integer reads --- src/libs/libJson2.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libs/libJson2.cpp b/src/libs/libJson2.cpp index ad684f9c9..71279adbe 100644 --- a/src/libs/libJson2.cpp +++ b/src/libs/libJson2.cpp @@ -751,7 +751,11 @@ static const int64_t* KYTY_SYSV_ABI JsonValueGetInteger(const JsonValue* self) { PRINT_NAME(); static const int64_t zero = 0; - return (self != nullptr && self->type == JsonValueTypeInteger ? &self->integer : &zero); + if (self != nullptr && + (self->type == JsonValueTypeInteger || self->type == JsonValueTypeUInteger)) { + return &self->integer; + } + return &zero; } static const double* KYTY_SYSV_ABI JsonValueGetReal(const JsonValue* self) {