From 022e26b1bd208bb90595531589a1ed68e2c4fef8 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sun, 2 Apr 2023 21:51:12 +0200 Subject: [PATCH] AutoIt: Slightly optimize parsing #region --- parsers/autoit.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/parsers/autoit.c b/parsers/autoit.c index 2d7d03e80f..5236573036 100644 --- a/parsers/autoit.c +++ b/parsers/autoit.c @@ -190,15 +190,13 @@ static void findAutoItTags (void) else if (match (p, "region", &p)) { skipSpaces (&p); - while (*p != '\0') - { - vStringPut (name, (int) *p); - ++p; - } - if (vStringLength(name) > 0) + if (*p != '\0') { - int k = makeSimpleAutoItTag (nls, name, K_REGION); + int k; + + vStringCatS (name, (const char *) p); + k = makeSimpleAutoItTag (nls, name, K_REGION); nestingLevelsPush (nls, k); vStringClear (name); }