Skip to content

Commit

Permalink
inc will lose current character
Browse files Browse the repository at this point in the history
  • Loading branch information
mosh committed Dec 21, 2021
1 parent 1ef61ba commit b27ca02
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Source/DB.pas
Expand Up @@ -174,6 +174,8 @@
var lQuoteChar := #0;
var i := 0;
while i < aString.Length do begin
var callInc := true;

case aString[i] of
'@': if lQuoteChar <> #0 then lSQ.Append(aString[i]) else begin
inc(i);
Expand All @@ -184,6 +186,7 @@
end else break;
end;
lSQ.Append(aReplacer(aString.Substring(lStart, i - lStart)));
callInc := false;
end;
'"', '`', '''': begin
if lQuoteChar = aString[i] then lQuoteChar := #0 else
Expand All @@ -193,8 +196,12 @@
else
lSQ.Append(aString[i])
end;
inc(i);
if(callInc)then
begin
inc(i);
end;
end;

exit lSQ.ToString;
end;
end;
Expand Down

0 comments on commit b27ca02

Please sign in to comment.