Crash when using bitset

From: Karl B Buchner (zerker@juno.com)
Date: 02/08/02


I'm using bitset for bitvectors in my MUD.  There are
a few problems i'm running into.  Here's the major one:

When flags->test(BRIEF) is called on player flags, the mud crashes.
The following is the call stack:

_CxxThrowException@8 + 58 bytes
bitset<8>::_Xran() line 250 + 80 bytes
bitset<8>::test(unsigned int 16) line 179
character::showroom(room * 0x00d17650) line 254 + 16 bytes
And the relevent code:
#define BRIEF        16
#define PLRBITS   8

in showroom:
if(!(flags.test(BRIEF)))

in class character:

bitset<PLRBITS> flags;

the test in showroom is the only member of bitset
that has been called at this point.  The bits should all
be clear (I think that's the default, right?)

In case anyone cares, the exact error is
First-chance exception in Dynamic.exe: 0xE06D7363: Microsoft C++
Exception.


^Blaize^
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
http://dl.www.juno.com/get/web/.

--
   +---------------------------------------------------------------+
   | 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