aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Converter/src/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Converter/src/main.c b/Converter/src/main.c
index b60e80e..fbcd938 100644
--- a/Converter/src/main.c
+++ b/Converter/src/main.c
@@ -16,7 +16,9 @@ int main(int argc, char *argv[])
}
else
{
- puts(compile_line(argv[1], strnlen(argv[1], 1024), "<stdin>"));
+ string output = (compile_line(argv[1], strnlen(argv[1], 1024), "<stdin>"));
+ puts(output);
+ free(output);
}
}
@@ -27,7 +29,9 @@ int main(int argc, char *argv[])
printf("> ");
char *buf = malloc(sizeof(*buf) * 1024);
fgets(buf, 1024, stdin);
- puts(compile_line(buf, 1024, "<stdin>"));
+ string output = (compile_line(buf, 1024, "<stdin>"));
+ puts(output);
+ free(output);
}
}
}