Browse Source

* empty result of IntParseString() in case the input is empty, fixes double
output lines in generated config files by fpcmkcfg such as mentioned in
mantis #22505


git-svn-id: trunk@21969 -

Jonas Maebe 13 years ago
parent
commit
16974d2f08
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/fcl-base/src/fptemplate.pp

+ 2 - 2
packages/fcl-base/src/fptemplate.pp

@@ -462,9 +462,9 @@ begin
   if FAllowTagParams then
   begin//template tags with parameters are allowed
     SLen:=Length(Src);
+    Result:='';
     If SLen=0 then
       exit;
-    Result:='';
     SP:=PChar(Src);
     P:=SP;
     While (P-SP<SLen) do
@@ -515,10 +515,10 @@ begin
     If FParseLevel>FMaxParseDepth then
       Raise ETemplateParser.CreateFmt(SErrParseDepthExceeded,[FMaxParseDepth]);
     SLen:=Length(Src); // Minimum
+    Result:='';
     If SLen=0 then
       exit;
 //    STLen:=Length(FStartDelimiter);
-    Result:='';
     SP:=PChar(Src);
     P:=SP;
     While (P-SP<SLen) do