From 13542572ab9d554593f772c955910ca1c9a18100 Mon Sep 17 00:00:00 2001 From: Varriount Date: Sat, 14 Jun 2014 22:10:54 -0400 Subject: [PATCH] Update json.nim Fixed a bug with json.[], which caused a segfault on debug builds. --- lib/pure/json.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/json.nim b/lib/pure/json.nim index 799cd6d582..bd5259f95e 100644 --- a/lib/pure/json.nim +++ b/lib/pure/json.nim @@ -669,7 +669,7 @@ proc len*(n: PJsonNode): int = proc `[]`*(node: PJsonNode, name: string): PJsonNode = ## Gets a field from a `JObject`, which must not be nil. ## If the value at `name` does not exist, returns nil - assert(node != nil) + assert(not isNil(node)) assert(node.kind == JObject) for key, item in items(node.fields): if key == name: