mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 11:28:07 +02:00
* tests: Fixed string comparison.
git-svn-id: trunk@33302 -
This commit is contained in:
parent
a1b8c0f9e3
commit
d43e5dcab8
@ -36,10 +36,10 @@ var
|
|||||||
|
|
||||||
function CompareDesc(d1, d2 : PChar) : boolean;
|
function CompareDesc(d1, d2 : PChar) : boolean;
|
||||||
begin
|
begin
|
||||||
if Is_IntResource(d1) then
|
if Is_IntResource(d1) or Is_IntResource(d2) then
|
||||||
Result:=PtrUInt(d1)=PtrUInt(d2)
|
Result:=PtrUInt(d1)=PtrUInt(d2)
|
||||||
else
|
else
|
||||||
Result:=CompareChar0(d1[0],d2[0],MaxInt)=0;
|
Result:=StrComp(d1, d2) = 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ResFound(ResourceType, ResourceName : PChar; IDLanguage : word);
|
procedure ResFound(ResourceType, ResourceName : PChar; IDLanguage : word);
|
||||||
|
@ -37,10 +37,10 @@ var
|
|||||||
|
|
||||||
function CompareDesc(d1, d2 : PChar) : boolean;
|
function CompareDesc(d1, d2 : PChar) : boolean;
|
||||||
begin
|
begin
|
||||||
if Is_IntResource(d1) then
|
if Is_IntResource(d1) or Is_IntResource(d2) then
|
||||||
Result:=PtrUInt(d1)=PtrUInt(d2)
|
Result:=PtrUInt(d1)=PtrUInt(d2)
|
||||||
else
|
else
|
||||||
Result:=CompareChar0(d1[0],d2[0],MaxInt)=0;
|
Result:=StrComp(d1, d2) = 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ResFound(ResourceType, ResourceName : PChar; IDLanguage : word);
|
procedure ResFound(ResourceType, ResourceName : PChar; IDLanguage : word);
|
||||||
|
Loading…
Reference in New Issue
Block a user