From b401625783c8139fd1900765eaf7b6973d99dbba Mon Sep 17 00:00:00 2001 From: kichik Date: Thu, 24 Nov 2005 19:51:24 +0000 Subject: [PATCH] stop search for function body at the end of the string git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4422 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/Math/Source/Math.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Contrib/Math/Source/Math.c b/Contrib/Math/Source/Math.c index 5149941f..4fdb6482 100644 --- a/Contrib/Math/Source/Math.c +++ b/Contrib/Math/Source/Math.c @@ -245,7 +245,9 @@ void PlaceFunction(char *&vb, char *&sp, ParseInfo *pi, int redefine) } // find nearest round bracket - function body - while (*sp != '(') sp++; + while (*sp != '(' && *sp) sp++; + if (!*sp) + return; sp++; // now we are ready to parse function body