You must be a  Visual Basic Programmer.  VB stores "0" as the value in any
numerical variable. C, on the other hand, does not. That's up to "you" to
set it's initial value. You could set it at declaration time with:

int somevar = 0;

That way it starts out as being "0".

Your crashing is from someplace else. Use the backtrace(bt) to find out the
path of crashing. Sometimes it's not the last one in the list, it's
sometimes the one the middle that caused the problem.

Rheede



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of J
Sent: Friday, August 02, 2002 12:54 AM
To: ROM Mailing list
Subject: Buffer fun! FUN!


I think my email last time was Rich Text encoded.  Thus none of you ever got
it.  Thus you don't know what I'm talking about.  ...CARRYING ON!

I believe I am having a few memory leaks.. when an integer is called, say
'int hp' or whatever, gdb shows the value of hp to be some preposterous
number you couldn't enter on most hand calculators.  Granted the integer is
redefined before it's used, but I doubt I'm crazy to assume it should be 0,
by default?  This may be the reason my mud is crashing without any
explicable reason when I list skills or spells, when I haven't changed much
anything since they worked fine.

Correct me if I'm wrong, my code knowledge is what I've taught myself.  An
extensive library indeed.


Reply via email to