mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
fix: std/marshal unmarshaling of ref objects (#22983)
Fixes #16496  Test case added. Note that this test (t9754) does pass locally, but there are tons of failures by default on OS X arm64, mostly around the bohem GC, so it's pretty spammy, and could easily have missed something. If there are better instructions please do let me know. --------- Co-authored-by: John Viega <viega@Johns-MacBook-Pro.local> Co-authored-by: John Viega <viega@Johns-MBP.localdomain> Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
This commit is contained in:
@@ -210,7 +210,8 @@ proc loadAny(p: var JsonParser, a: Any, t: var Table[BiggestInt, pointer]) =
|
||||
setPointer(a, nil)
|
||||
next(p)
|
||||
of jsonInt:
|
||||
setPointer(a, t.getOrDefault(p.getInt))
|
||||
var raw = t.getOrDefault(p.getInt)
|
||||
setPointer(a, addr raw)
|
||||
next(p)
|
||||
of jsonArrayStart:
|
||||
next(p)
|
||||
|
||||
Reference in New Issue
Block a user