Hello, James!
You have to allocate memory BEFORE storing data there, i. e. you should
change datanick.pas lines about 63 .. 66 from:
nicks[nNicks] := TNick.init(nick, hops, signon, ident, host,
server, unused, name);
{getMem(nicks, sizeOf(TNick) * nNicks);}
inc(nNicks);
reAllocMem(ni
Another interesting thing to note as well which I think is rather
strange...
if you change in datanicks.pas lien 65,
reAllocMem(nicks, sizeOf(TNick) * nNicks);
to
getMem(nicks, sizeOf(TNick) * nNicks);
It will crash the same way as before, but at the 5th call of addNick
cheers
James
___
Hi all,
I've annoyed you guys enough with pointers, objects and clases :P I'm
sorry :)
This bugs me though as to why this program crashes at the 4th call to
addNick(nick: String);
Here is the gdb results, and attached is the source code if anyone is
willing to have a look.
thank you very much :