On Mon, 8 Dec 2014 17:36:43 +0100 (CET) Michael Van Canneyt <mich...@freepascal.org> wrote:
>[...] > > Michael, can you add a comment to this example, that runs beyond the > > strings: > > Testit('One string','One smaller string',255); > > ? There is no #0 character. So what does this example prove ? I'm not sure if every reader knows why this example works. The number should be lower or equal the length of the shortest string to avoid running out of bounds. The 255 looks as if it is ok to pass a number bigger than the length of the strings. For example this creates an AV on x86_64: AnsiStrLIComp('A','B',1000000); Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal