mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 16:09:25 +02:00
* fixed wrong use of CompareTextUnicodeStringProc() in
fpc_ansistr_compare_equal(). "make cycle" now works under Linux, but there is probably still a bug somewhere because I don't think that the compiler should ever trigger the code path the contained this bug git-svn-id: trunk@19139 -
This commit is contained in:
parent
e343e6263b
commit
85ed1b87d9
@ -726,7 +726,15 @@ begin
|
||||
r2:=S2;
|
||||
if (cp2=$ffff) or (cp2=0) then
|
||||
SetCodePage(r2,DefaultSystemCodePage,false);
|
||||
Result:=widestringmanager.CompareTextUnicodeStringProc(UnicodeString(r1),UnicodeString(r2));
|
||||
//convert them to utf8 then compare
|
||||
SetCodePage(r1,65001);
|
||||
SetCodePage(r2,65001);
|
||||
Maxi:=Length(r1);
|
||||
temp:=Length(r2);
|
||||
Result := Maxi - temp;
|
||||
if Result = 0 then
|
||||
if MaxI>0 then
|
||||
result:=CompareByte(r1[1],r2[1],MaxI);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user