diff options
-rw-r--r-- | src/corelib/fpg_stringutils.pas | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/fpg_stringutils.pas b/src/corelib/fpg_stringutils.pas index b5ca0993..1f3ce036 100644 --- a/src/corelib/fpg_stringutils.pas +++ b/src/corelib/fpg_stringutils.pas @@ -217,7 +217,6 @@ var Source: PChar; Dest: PChar; SourceEnd: PChar; - CharLen: integer; SourceCopied: PChar; // Copies from SourceStart till Source to Dest and updates Dest @@ -242,8 +241,7 @@ begin SourceEnd := Source + SourceLen; while Source<SourceEnd do begin - CharLen := UTF8CharacterLength(Source); - if (CharLen=1) and (Source^='\') then + if (Source^='\') then begin CopyPart; inc(Source); @@ -272,7 +270,7 @@ begin SourceCopied := Source; end else - Inc(Source, CharLen); + Inc(Source, UTF8CharacterLength(Source)); end; CopyPart; SetLength(Result, Dest - PChar(Result)); |