summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorVarriount <Varriount@users.noreply.github.com>2014-06-14 22:10:54 -0400
committerVarriount <Varriount@users.noreply.github.com>2014-06-14 22:10:54 -0400
commit13542572ab9d554593f772c955910ca1c9a18100 (patch)
treeb9f79d6f670b8b75815b896de8713f310da0ca8d
parentd927eb5854e9c6c005344bc81d4632ffc8f5d975 (diff)
downloadNim-13542572ab9d554593f772c955910ca1c9a18100.tar.gz
Update json.nim
Fixed a bug with json.[], which caused a segfault on debug builds.
-rw-r--r--lib/pure/json.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/json.nim b/lib/pure/json.nim
index 799cd6d58..bd5259f95 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: