[fpc-pascal]CompareStr

Jilani Khaldi jilani.khaldi at tin.it
Sat Feb 15 23:14:56 CET 2003


>> >At least for FPC 1.0.6, it's in file rtl/objpas/sysstr.inc, lines 109 - 110
>> >:
>> >You should replace these two lines
>> >   if Count1 > Count2 then result := ord(s1[Count1 + 1])
>> >   else result := -ord(s2[Count2 + 1]);
>> >with
>> >   if Count1 > Count2 then result := ord(s1[Count + 1])
>> >   else result := -ord(s2[Count + 1]);
>> >(that is, the "Count1" and "Count2" in array indexes should be replaced
>> >with  "Count").
>> >
>> >That's all for THAT bug.
>> I have done this and run make (/usr/local/..rtl/ under Linux) but:
>>
>> CompareStr('hello', 'hello wrld') still gives 0.
>>
>> What am I missing here?
>
>The official 1.0.6 had this bug. It's fixed now in the latest snapshots,
>as confirmed by the original poster.
Well. But, what I want to do is just to correct this bug and stick with 1.0.6. Why do I have to update the hole compiler for just one bug when 
I could fix it with little editing?

Thank you.

ps.
If sombody has fixed this bug in fpc-1.0.6, please tells me how he/she did it.

--
Jilani Khaldi
http://www.jilani.net







More information about the fpc-pascal mailing list