From bcf15d34aae382076cf4dd09336ff7c8d02af5be Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sun, 25 Sep 2016 14:30:42 +0200 Subject: Various minor cleanups --- interpreter/print.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'interpreter/print.c') diff --git a/interpreter/print.c b/interpreter/print.c index 78976c2..d410ba2 100644 --- a/interpreter/print.c +++ b/interpreter/print.c @@ -9,7 +9,7 @@ #include "mem.h" void print_token(token* tk) { - char c; + char c = NULL; switch (tk->kind) { case TOKEN_SEMICOLON: c = ';'; break; case TOKEN_COLON: c = ':'; break; @@ -28,7 +28,8 @@ void print_token(token* tk) { printf("%d", *((int*) tk->var)); return; } - printf("%c", c); + if (c) + printf("%c", c); } void print_token_list(token_list* list) { -- cgit v1.2.3