[Circle] Xapobjs, tiny bug

From: Patrick Dughi (dughi@imaxx.net)
Date: 03/28/00

Noticed a stupid bug with xapobjs the other day, after I wiped an
(apparently) unused zone.  Though, someone had somehow gotten a hold of a
few of these items.

        If you notice the loop for scanning out objects looks like this:

while(!feof(fl)) {
  if(*line == '#') {
    /* additional checks to verify this is the start of an object */

   /* statments to read more file lines till the end of this object */

        However, anytime there's a problem the code does a 'continue'...
so it bypasses what ever line it's on, and goes to the next. Cept, it
doesn't.  It still is working on that same 'line'.  So, simply, in the obj
load function, put the line "get_line(fl,line)" before each 'continue'
statment, and you can have random garbage in your objfile (between object
listings), and also correctly handle nonexistant objects as garbage.


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |

This archive was generated by hypermail 2b30 : 04/10/01 PDT