#67 Intermittant seqfault

closed-fixed
nobody
None
5
2007-03-07
2006-04-24
Anonymous
No

The line:

if ((cw < _global->weapons && !nm[cw]) || (cw >=
_global->items) || (!ni[cw - _global->weapons]))

in file player.cc causes an intermittant segfault. The
statement misses a condition which results in negative
index into an array. The following code (for example)
will correct the problem:

if ((cw < _global->weapons && !nm[cw]) || (cw >=
_global->items) || (cw >= _global->weapons && !ni[cw -
_global->weapons]))

Also (unrelated) the following include is required in
file parser.cc for a successful compile on OpenBSD:

#include <sys/stat.h>

Discussion

  • Jesse Smith

    Jesse Smith - 2007-02-28
    • status: open --> open-accepted
     
  • Jesse Smith

    Jesse Smith - 2007-03-07
    • status: open-accepted --> closed-fixed
     
  • Jesse Smith

    Jesse Smith - 2007-03-07

    Logged In: YES
    user_id=473129
    Originator: NO

    I think this has been corrected in Atanks-2.0 and newer. Thanks.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks