소스 검색

fix unmarshal unhandled error (#4515)

* fix unmarshal unhandled error
o:tone 9 달 전
부모
커밋
d15d152746
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      core/encoding/json/unmarshal.odin

+ 1 - 1
core/encoding/json/unmarshal.odin

@@ -419,7 +419,7 @@ unmarshal_object :: proc(p: ^Parser, v: any, end_token: Token_Kind) -> (err: Unm
 		}
 	
 		struct_loop: for p.curr_token.kind != end_token {
-			key, _ := parse_object_key(p, p.allocator)
+			key := parse_object_key(p, p.allocator) or_return
 			defer delete(key, p.allocator)
 			
 			unmarshal_expect_token(p, .Colon)