diff options
Diffstat (limited to 'repl.c')
| -rw-r--r-- | repl.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -354,11 +354,11 @@ void eval(env_t *env, ast_t *ast, void *dest) case Int: { if (!dest) return; switch (Match(ast, Int)->bits) { - case 0: *(Int_t*)dest = Int$from_text(Text$from_str(Match(ast, Int)->str), NULL); break; - case 64: *(int64_t*)dest = Int64$from_text(Text$from_str(Match(ast, Int)->str), NULL); break; - case 32: *(int32_t*)dest = Int32$from_text(Text$from_str(Match(ast, Int)->str), NULL); break; - case 16: *(int16_t*)dest = Int16$from_text(Text$from_str(Match(ast, Int)->str), NULL); break; - case 8: *(int8_t*)dest = Int8$from_text(Text$from_str(Match(ast, Int)->str), NULL); break; + case 0: *(Int_t*)dest = Int$from_text(Text$from_str(Match(ast, Int)->str)); break; + case 64: *(int64_t*)dest = Int64$from_text(Text$from_str(Match(ast, Int)->str)).i; break; + case 32: *(int32_t*)dest = Int32$from_text(Text$from_str(Match(ast, Int)->str)).i; break; + case 16: *(int16_t*)dest = Int16$from_text(Text$from_str(Match(ast, Int)->str)).i; break; + case 8: *(int8_t*)dest = Int8$from_text(Text$from_str(Match(ast, Int)->str)).i; break; default: errx(1, "Invalid int bits: %ld", Match(ast, Int)->bits); } break; |
