Re: Bitvectors

From: Michael Gallagher (m_gally@hotmail.com)
Date: 12/17/00


>Well for instance I added Auto-assist and ever since whenever stated a
>player that had it I got this message: PRF: <INVALID BITVECTOR>

I don't see how that's possible, if you look at the sprintbit function
below it can't return "<INVALID BITVECTOR>", unless you've changed it
or you have 128bit bitvectors or "<INVALID BITVECTOR>" is in constants.c.

void sprintbit(bitvector_t bitvector, const char *names[], char *result)
{
  long nr;

  *result = '\0';

  for (nr = 0; bitvector; bitvector >>= 1) {
    if (IS_SET(bitvector, 1)) {
      if (*names[nr] != '\n') {
        strcat(result, names[nr]);
        strcat(result, " ");
      } else
        strcat(result, "UNDEFINED ");
    }
    if (*names[nr] != '\n')
      nr++;
  }

  if (!*result)
    strcpy(result, "NOBITS ");
}


Subliminal
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

--
   +---------------------------------------------------------------+
   | 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 : 04/11/01 PDT