diff options
-rw-r--r-- | grammar/rainerscript.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c index d1d64e6e..320e66d0 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -743,9 +743,11 @@ var2Number(struct var *r, int *bSuccess) if(r->datatype == 'S') { n = es_str2num(r->d.estr, bSuccess); } else { - *bSuccess = 1; + n = r->d.n; + if(bSuccess) + *bSuccess = 1; } - return r->d.n; + return n; } /* ensure that retval is a string; if string is no number, |