even more strict isNil handling for strings/seqs in order to detect bugs
This commit is contained in:
parent
9047c3f582
commit
64517445ea
36 changed files with 193 additions and 245 deletions
|
|
@ -98,8 +98,7 @@ proc storeAny(s: Stream, a: Any, stored: var IntSet) =
|
|||
of akProc, akPointer, akCString: s.write($a.getPointer.ptrToInt)
|
||||
of akString:
|
||||
var x = getString(a)
|
||||
if isNil(x): s.write("null")
|
||||
elif x.validateUtf8() == -1: s.write(escapeJson(x))
|
||||
if x.validateUtf8() == -1: s.write(escapeJson(x))
|
||||
else:
|
||||
s.write("[")
|
||||
var i = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue