Hi.
Sysstr comparing routines does not work correct if two strings were empty. Example:
program comp;
uses
SysUtils;
var
a, b: array[0..1] of char;
begin
a[0] := #0;
a[1] := #1;
b[0] := #0;
b[1] := #0;
writeln(AnsiStrComp(a, b)=0); // '',''=0
endThis program returns false and theoreticaly repeat..until may SIGSEGV because overflows empty PChar boundary after first cycle.
Patch is in the attachment.
Petr
Ing. Petr Kristan
.
EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice
tel: +420 466335223 Czech Republic (Eastern Europe)
fax: +420 466510709
