Fix buffer overflow when charming/sleeping/paralyzing a level 40 monster

This commit is contained in:
2015-02-06 13:46:53 -05:00
parent a1da743a47
commit efe03b977f
2 changed files with 2 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
#include "pc.h"
#include "spell.hpp"
const short cCreature::charm_odds[20] = {90,90,85,80,78, 75,73,60,40,30, 20,10,4,1,0, 0,0,0,0,0};
const short cCreature::charm_odds[21] = {90,90,85,80,78, 75,73,60,40,30, 20,10,4,1,0, 0,0,0,0,0, 0};
cCreature::cCreature(){
number = active = attitude = start_attitude = 0;

View File

@@ -17,7 +17,7 @@
class cCreature : public cMonster, public cTownperson, public iLiving {
public:
static const short charm_odds[20];
static const short charm_odds[21];
short active, attitude;
location cur_loc;
short summon_time;