> > The particular crash in question is by > cstringpattern: AnsiString; > len:=length(cstringpattern); > recordtokenbuf.write(cstringpattern[1],len); > with a len of zero, writing 0 bytes from an address that is out of range. > > > Could be solved by using > {$PUSH} {$R-} > {$POP} > around those lines. >
Or typecast it to PChar... I always found it a PITA that Delphi raises an Exception when accessing the ending #0 with $R+ :-/ -Flávio _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel