mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 13:30:06 +00:00
Fix patcher refusing to patch between unsigned and signed integers
This commit is contained in:
parent
59303ba30d
commit
bf12ed4c47
@ -941,8 +941,12 @@ static void patchJSON(json* base, json* patch) {
|
|||||||
if (patch->is_null() || base->is_null())
|
if (patch->is_null() || base->is_null())
|
||||||
return; // no nulls allowed!!
|
return; // no nulls allowed!!
|
||||||
|
|
||||||
if ((json::value_t)*base != (json::value_t)*patch)
|
if ((json::value_t)(*base) != (json::value_t)(*patch)) {
|
||||||
return; // no type mismatch allowed!!
|
// verify type mismatch. unsigned <-> integer is ok.
|
||||||
|
if (!((base->is_number_integer() && patch->is_number_unsigned())
|
||||||
|
|| (base->is_number_unsigned() && patch->is_number_integer())))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// case 1: type is array
|
// case 1: type is array
|
||||||
if (patch->is_array()) {
|
if (patch->is_array()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user