From 4db2b1ef398fdb6ee730a58db56bd09ab8f14f06 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Fri, 21 Nov 2014 22:49:12 -0500 Subject: [PATCH] fixed bug in the comma word and cleaned up the create word --- source/onward/onward.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/onward/onward.c b/source/onward/onward.c index f31b92e..a040f53 100755 --- a/source/onward/onward.c +++ b/source/onward/onward.c @@ -194,15 +194,16 @@ defcode("create", create, &exec, 0u) { ((word_t*)here)->name = name; ((word_t*)here)->code = (value_t*)(((word_t*)here) + 1); /* Update latest and here variables and initialize the code array */ - latest = here; - here = (value_t)(((word_t*)here) + 1); + latest = here; + here += sizeof(word_t); *((value_t*)here) = 0u; } /** Append a word to the latest word definition */ defcode(",", comma, &create, 0u) { - *((value_t*)here++) = onward_aspop(); - *((value_t*)here) = 0u; + *((value_t*)here) = onward_aspop(); + here += sizeof(value_t); + *((value_t*)here) = 0u; } /** Set the interpreter mode to "interpret" */ -- 2.54.0