From: Michael D. Lowis Date: Thu, 29 Jan 2015 17:47:00 +0000 (-0500) Subject: Fixed alignment algorithm in create word X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=65dc86cd5adc2ad42272207d37c5459f5759bdf2;p=projs%2Fonward.git Fixed alignment algorithm in create word --- 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 */