mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-30 01:01:21 +00:00
Fix Json2 integer reads
This commit is contained in:
1 parent
7c9148dd47
commit
32e6a433e8
1 file changed
+5
-1
@@ -751,7 +751,11 @@ static const int64_t* KYTY_SYSV_ABI JsonValueGetInteger(const JsonValue* self) {
|
|||||||
PRINT_NAME();
|
PRINT_NAME();
|
||||||
|
|
||||||
static const int64_t zero = 0;
|
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) {
|
static const double* KYTY_SYSV_ABI JsonValueGetReal(const JsonValue* self) {
|
||||||
|
|||||||
Reference in new issue
Block a user