From dcae970e07e6de6229c927a74f4c233a2e5e2299 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Thu, 29 Mar 2012 18:22:07 +0200 Subject: [PATCH] Set the correct length for literal suffixes, i.e. do not count the terminating NUL. --- lexer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lexer.c b/lexer.c index daeda8a..8a339aa 100644 --- a/lexer.c +++ b/lexer.c @@ -324,8 +324,8 @@ finish_suffix: } obstack_1grow(&symbol_obstack, '\0'); - size_t size = obstack_object_size(&symbol_obstack); - char *string = obstack_finish(&symbol_obstack); + size_t size = obstack_object_size(&symbol_obstack) - 1; + char *string = obstack_finish(&symbol_obstack); lexer_token.number.suffix = identify_string(string, size); } -- 2.20.1