From 2a1191bfc11b4a4ccd284c16da8b3745861e58f2 Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 3 May 1988 15:04:30 +0000 Subject: [PATCH] fixed very minor bug: strings should be aligned on word_boundaries --- lang/m2/comp/LLlex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lang/m2/comp/LLlex.c b/lang/m2/comp/LLlex.c index 4506d097c..627513387 100644 --- a/lang/m2/comp/LLlex.c +++ b/lang/m2/comp/LLlex.c @@ -153,7 +153,8 @@ GetString(upto) } str->s_length = p - str->s_str; *p = '\0'; - str->s_str = Realloc(str->s_str, (unsigned)(str->s_length) + 1); + str->s_str = Realloc(str->s_str, + (unsigned)((str->s_length+(int)word_size) & ~((int)word_size-1))); if (str->s_length == 0) str->s_length = 1; /* ??? string length at least 1 ??? */ return str; -- 2.34.1