From 6beef5d29a787b74a35c5940cf650eb2ca5465b0 Mon Sep 17 00:00:00 2001 From: Yaniszh <119854385+Yaniszh@users.noreply.github.com> Date: Fri, 22 Mar 2024 21:57:44 +0800 Subject: [PATCH] Update parse.c fix while(condition) in declaration_specifiers() --- ch05/5-18-dcl/parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch05/5-18-dcl/parse.c b/ch05/5-18-dcl/parse.c index b27b42a..26d137d 100644 --- a/ch05/5-18-dcl/parse.c +++ b/ch05/5-18-dcl/parse.c @@ -24,7 +24,7 @@ void parse() { } static void declaration_specifiers() { - while (gettoken(), STORAGE_CLASS_SPECIFIER <= tokentype && tokentype <= TYPE_QUALIFIER) { + while (gettoken() && STORAGE_CLASS_SPECIFIER <= tokentype && tokentype <= TYPE_QUALIFIER) { strcat(specifiers, tokenval); strcat(specifiers, " "); }