summaryrefslogtreecommitdiffstats
path: root/dimension/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-02-02 22:30:34 -0500
committerTavian Barnes <tavianator@gmail.com>2010-02-02 22:30:34 -0500
commit0ede6bd34a27a01fe61ef8221ed38c8525c89e03 (patch)
tree6da8e4175b08f0c4f43fb2e445f671c887ae95a6 /dimension/parse.c
parentc07038c627a5601bf331b5c755b9fcce02249fe3 (diff)
downloaddimension-0ede6bd34a27a01fe61ef8221ed38c8525c89e03.tar.xz
Use dmnsn_new_ast_integer() in parsers.
Diffstat (limited to 'dimension/parse.c')
-rw-r--r--dimension/parse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dimension/parse.c b/dimension/parse.c
index 6ff5628..bd40ff8 100644
--- a/dimension/parse.c
+++ b/dimension/parse.c
@@ -791,7 +791,9 @@ dmnsn_eval(dmnsn_astnode astnode, dmnsn_symbol_table *symtable)
case DMNSN_AST_NONE:
case DMNSN_AST_INTEGER:
case DMNSN_AST_FLOAT:
- ++*astnode.refcount;
+ do {
+ ++*astnode.refcount;
+ } while (*astnode.refcount <= 1);
return astnode;
case DMNSN_AST_VECTOR: