mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-07-21 04:55:56 +02:00
Avoid calling compareword with maxi=0, as this generates an dynamic index range error when comiled with -CriotR option
This commit is contained in:
parent
5646d14a3c
commit
105382b8a1
@ -168,7 +168,8 @@ unit widestr;
|
|||||||
temp:=s2.len;
|
temp:=s2.len;
|
||||||
if maxi>temp then
|
if maxi>temp then
|
||||||
maxi:=Temp;
|
maxi:=Temp;
|
||||||
temp:=compareword(s1.data[0],s2.data[0],maxi);
|
if maxi>0 then
|
||||||
|
temp:=compareword(s1.data[0],s2.data[0],maxi);
|
||||||
if temp=0 then
|
if temp=0 then
|
||||||
temp:=s1.len-s2.len;
|
temp:=s1.len-s2.len;
|
||||||
comparewidestrings:=temp;
|
comparewidestrings:=temp;
|
||||||
|
Loading…
Reference in New Issue
Block a user