[OasisOLC/DGs] On nasty little typo and it's remedy

From: Deja Augustine (PraetorXI@aol.com)
Date: 03/12/01


I looked through the archives and wasn't able to find anything regarding this
interesting little typo in the "DGScripts 7a w/ Oasis OLC patch" that one can
commonly find, so I decided that I would send this little tidbit to the list
in hopes of preserving the sanity of other coders.

Basically in the following files:

dg_wldcmd.c
redit.c
oedit.c
medit.c
zedit.c

one external variable is listed as:
extern int top_of_zone_table;

This causes problems since the rest of the engine regards it as:
extern zone_rnum top_of_zone_table;

And zone_rnum is defined as an sh_int which is a short signed int.  Certain
bugs arise from this typo such as:
- zedit new xxx tries to allocate somewhere around 1 to 2 gigabytes of memory
- redit/oedit/medit/zedit save xxx doesn't actually work and your
constructions are not written to disk

so by simply changing
extern int top_of_zone_table;
to
extern zone_rnum top_of_zone_table;
in those files will happily remedy those errors.

I just wanted to share what I've discovered from days of pulling my hair out.
 I hope it helps someone.

-Praetor

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/04/01 PST