From 7bcbed08a84803693fdb2fb304f688d2ac439f99 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 16 Oct 2026 13:09:05 -0400 Subject: [PATCH] Accept unsigned values in signed fields when packing Dumps made before the signed-read change store values like -1 as 4294967295. write_long now converts 2147483648..4294967295 to the signed equivalent (same bytes), so existing community dumps still pack. Verified: all 10332 files of an older dump repack identical. Co-Authored-By: Claude Opus 5.5 --- mbEditorPro2.0/JSON_CHANGES.md | 12 +++++------- mbEditorPro2.0/arcane/util/ResStream.py | 3 +++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/mbEditorPro2.0/JSON_CHANGES.md b/mbEditorPro2.0/JSON_CHANGES.md index 258fa70..65fad73 100644 --- a/mbEditorPro2.0/JSON_CHANGES.md +++ b/mbEditorPro2.0/JSON_CHANGES.md @@ -25,13 +25,11 @@ The binary `.cache` format did not change. Every resource in | Signed 32-bit fields | Values that were `4294967295` are now `-1`, `4294967286` is now `-10`, and so on | Accept negative integers | | Grant attribute and power keys | First element of each pair is now a name string when the hash is known | Accept a string or an integer; convert names with `string_to_hash` | -Old JSON dumps are not fully compatible. `4294967295` and `-1` are the same -four bytes, but the packer now writes signed fields with `struct.pack('