From 9e4b1661e3f42d406f8bd8f3bc864adf72135fe8 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 20 Nov 2005 19:10:13 +0000 Subject: [PATCH] Fixed bug at21914 (faluco) --- compiler/libpc300/sc2.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/compiler/libpc300/sc2.c b/compiler/libpc300/sc2.c index 15478521..f2f3a3ab 100755 --- a/compiler/libpc300/sc2.c +++ b/compiler/libpc300/sc2.c @@ -1189,6 +1189,7 @@ static int command(void) #endif #if !defined NO_DEFINE case tpDEFINE: { + int flag=0; ret=CMD_DEFINE; if (!SKIPPING) { char *pattern,*substitution; @@ -1200,7 +1201,13 @@ static int command(void) lptr++; start=lptr; /* save starting point of the match pattern */ count=0; - while (*lptr>' ' && *lptr!='\0') { + while (*lptr!='\0') { + if (*lptr=='(') + flag=1; + if (flag && *lptr==')') + flag=0; + if (!flag && *lptr<=' ') + break; litchar(&lptr,0); /* litchar() advances "lptr" and handles escape characters */ count++; } /* while */