diff options
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -125,6 +125,7 @@ sym_t* try_eval_internal(sym_t* symbol, hashtable_t* symbolScope) { firstInt = symtoi(v); } else if (type == FLOAT) { + firstFloat = symtof(v); } else if (type == STRING) { firstString = symtos(v); @@ -140,9 +141,12 @@ sym_t* try_eval_internal(sym_t* symbol, hashtable_t* symbolScope) { return init_sym_int(0); } } - /* TODO: float */ else if (type == FLOAT) { - + float sf = symtof(v); + destroy_sym(v); + if (sf != firstFloat) { + return init_sym_int(0); + } } else if (type == STRING) { char* ss = symtos(v); |
