aboutsummaryrefslogtreecommitdiffstats
path: root/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'node.c')
-rw-r--r--node.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/node.c b/node.c
index bb2fe437..f40ccdc9 100644
--- a/node.c
+++ b/node.c
@@ -67,9 +67,9 @@ r_force_number(NODE *n)
return n;
/*
- * We should always set NUMCUR and clear MAYBE_NUM, and we may possibly
- * change STRING to NUMBER if MAYBE_NUM was set and it's a good numeric
- * string.
+ * We should always set NUMCUR. If MAYBE_NUM is set and it's a
+ * numeric string, we clear STRING and enable NUMBER, but if it's not
+ * numeric, we disable MAYBE_NUM.
*/
/* All the conditionals are an attempt to avoid the expensive strtod */
@@ -164,7 +164,8 @@ badnum:
goodnum:
if ((n->flags & MAYBE_NUM) != 0) {
- n->flags &= ~(MAYBE_NUM|STRING);
+ /* leave MAYBE_NUM enabled to indicate that this is a strnum */
+ n->flags &= ~STRING;
n->flags |= NUMBER;
}
return n;
@@ -300,7 +301,6 @@ r_dupnode(NODE *n)
getnode(r);
*r = *n;
- r->flags &= ~FIELD;
r->flags |= MALLOC;
r->valref = 1;
/*