v0.1.1 decode hardening, round trip support, doc and test update
Test / test (push) Canceled after 0s
Test / test (push) Canceled after 0s
This commit is contained in:
15 files changed
+874
-651
No files matched your search
+2
-2
@@ -81,7 +81,7 @@ active = false
|
||||
}
|
||||
// Check int conversion in dynamic map (parser returns int/float, decode handles struct fields, but map keeps raw parser types)
|
||||
// Parser likely returns int for 55.
|
||||
if id, ok := cfg.Owner["id"].(int); !ok || id != 55 {
|
||||
if id, ok := cfg.Owner["id"].(int64); !ok || id != 55 {
|
||||
// Fallback check if parser returned generic float for number
|
||||
if fId, okf := cfg.Owner["id"].(float64); !okf || fId != 55 {
|
||||
t.Errorf("Owner.ID mismatch: got %T %v", cfg.Owner["id"], cfg.Owner["id"])
|
||||
@@ -481,4 +481,4 @@ speed = 3.0
|
||||
if cfg.Entities["enemy"] == nil || cfg.Entities["enemy"].Health != 50 {
|
||||
t.Errorf("enemy mismatch: %+v", cfg.Entities["enemy"])
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user