mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 13:56:59 +01:00
Fix Json2 integer reads
This commit is contained in:
@@ -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