Crash when using bitset

From: Karl B Buchner (
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:

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

Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:

   | FAQ: |
   | Archives: |
   | Newbie List:   |

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