Re: [Newbie] Problem with structures.

From: George Greer (greerga@circlemud.org)
Date: 10/31/02


On Thu, 31 Oct 2002, Dave Marquardt wrote:

>It seems like whenever I make alterations to the char_player_data
>structure memory in my game starts becoming corrupt.  Odd thing is, it
>seems to be completely random.  Like when I shift a new field around
>inside the structure to a different location the problem will seem to
>solve itself.  I even commented out some fields I added, and the presence
>of the comments alone seemed to have the same affect.  If there's
>something I'm overlooking, please let me know.  This sucks. :)

You have memory corruption somewhere.  Changing char_player_data only
shifts data around in memory so something different gets stomped on.  Try
ElectricFence, Purify, GCC with --enable-checking (not enabled in RH 8), or
the various debugging malloc() libraries.

--
George Greer
greerga@circlemud.org

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT