Please visit our sponsor, The Final Challenge!
Please help support TMC by visiting our sponsor

Member Discussions

terms


It's Not Just a Game |------[ http://www.retromud.org ]------| It's an ATTITUDE
6 Planets. 60 Races. 1,000 Skills & Spells. Infinite Possibilities.


[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]


1. Empty string issue. need help Thu Aug 21, 2008 [10:54 AM]
Kostanza
Email not supplied
member since: Nov 7, 2007
Reply
For some reason all strings that should be empty are being
set to seemingly garbage (they always show up as the degree
symbol in game). I've tried increasing the string space,
rolling back to older code when there was no issues, but it
still is going on. Has anyone ever encountered anything
like this? When I check the pfiles all the lines that
should be nothing mroe than a ~ for the end of hte string
all have the exact same garbage in them, and it usually ends
in <99>(~H~ (in vim). I'm running a GW style base on a
Redhat System. I've recompiled from the month old code,
rebooted the server, brought back old area files, but to no
avail. Is there some kind of system setting or something
that could have gotten set which would effect this?
It's an owned server, so no issues with running out of
memory or quotas etc.
Any suggestions are appreciated.


2. RE: Empty string issue. need help Thu Aug 21, 2008 [11:48 AM]
brakai
Email not supplied
member since: Aug 2, 2004
In Reply To
Reply
Assuming you're using C, you should check that all the string variables are set to NULL before they're dereferenced. Just freeing them isn't enough.

myString = NULL;


3. RE: Empty string issue. need help Thu Aug 21, 2008 [5:48 PM]
Lodren
Email not supplied
member since: Feb 18, 2004
In Reply To
Reply
Also remember that all of that garbage is now in your pfiles, and even when you fix the bug itself the garbage is going to be loaded back into memory like any other stored string. You'll have to scrub the pfiles or revert to backups.


It's Not Just a Game |------[ http://www.retromud.org ]------| It's an ATTITUDE
6 Planets. 60 Races. 1,000 Skills & Spells. Infinite Possibilities.