From 65dc86cd5adc2ad42272207d37c5459f5759bdf2 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Thu, 29 Jan 2015 12:47:00 -0500 Subject: [PATCH] Fixed alignment algorithm in create word --- source/onward.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/onward.c b/source/onward.c index d436317..5f1a235 100755 --- a/source/onward.c +++ b/source/onward.c @@ -212,9 +212,7 @@ defcode("create", create, &exec, 0u) { char* name = (char*)onward_aspop(); /* Copy the name to a more permanent location */ size_t str_size = strlen(name) + 1; - size_t new_size = (str_size % sizeof(value_t)) - ? ((str_size + (sizeof(value_t) - 1)) & ~sizeof(value_t)) - : str_size; + size_t new_size = str_size + ((sizeof(value_t) - (str_size % sizeof(value_t))) % sizeof(value_t)); name = memcpy((void*)here, name, str_size); here += new_size; /* Start populating the word definition */ -- 2.52.0