bugfix: nil -> emptyNode

This commit is contained in:
Araq 2011-10-22 09:00:01 +02:00
commit ded7f6a6d5
4 changed files with 4 additions and 3 deletions

View file

@ -123,7 +123,7 @@ type
PRodReader* = ref TRodReader
const
FileVersion* = "1018" # modify this if the rod-format changes!
FileVersion* = "1019" # modify this if the rod-format changes!
var rodCompilerprocs*: TStrTable

View file

@ -286,7 +286,7 @@ proc encodeSym(w: PRodWriter, s: PSym, result: var string) =
if not astNeeded(s):
codeAst = s.ast.sons[codePos]
# ugly hack to not store the AST:
s.ast.sons[codePos] = nil
s.ast.sons[codePos] = ast.emptyNode
encodeNode(w, s.info, s.ast, result)
if codeAst != nil:
# resore the AST: