mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 19:16:16 +02:00
Fix UnicodeSpacesToASCII, After "Replace()" p is already replaced. Old code could skip codepoints or iterate past end of string. Don't replace regular space #20 with itself (nop).
This commit is contained in:
parent
c9c3d54bf2
commit
042ddcfe20
@ -5455,7 +5455,7 @@ begin
|
||||
$2060, // zero width word joiner
|
||||
$FEFF // zero width no-break space
|
||||
: Replace(CodepointLen,'');
|
||||
$0020, // space
|
||||
// $0020, // space
|
||||
$00A0, // non breakable space
|
||||
$2000, // en quad, half wide space
|
||||
$2002, // en space, half wide space
|
||||
@ -5472,8 +5472,8 @@ begin
|
||||
$2001, // em quad, wide space
|
||||
$2003 // em space, wide space
|
||||
: Replace(CodepointLen,' ');
|
||||
else inc(p,CodepointLen);
|
||||
end;
|
||||
inc(p,CodepointLen);
|
||||
end;
|
||||
end;
|
||||
until false;
|
||||
|
Loading…
Reference in New Issue
Block a user