aboutsummaryrefslogtreecommitdiffstats
path: root/forth.c
diff options
context:
space:
mode:
Diffstat (limited to 'forth.c')
-rw-r--r--forth.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/forth.c b/forth.c
index 14c285f..3250aa7 100644
--- a/forth.c
+++ b/forth.c
@@ -90,11 +90,9 @@ char* buffer_eval(int len, char* line) {
s = stack_new();
initialised = true;
outputline = 0;
+ outputbuffer = malloc(sizeof(char) * 1024);
}
- else {
- free(outputbuffer);
- }
- outputbuffer = malloc(sizeof(char) * 1024);
+ strcpy(outputbuffer, "");
eval(ot, s, len, line);
if (outputline) {
outputline = 0;