From 5d1a002d3b10e7e833790d85aad727a30fd5703c Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 14 Jul 2016 01:25:00 +0200 Subject: Fixed Coverity CID 150315: Integer overflowed argument Fixes a possible unsigned underflow (and changes the type of some unnecessarily unsigned variables to signed, such as pc->max_level[][]) Signed-off-by: Haru --- src/map/pc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/pc.h') diff --git a/src/map/pc.h b/src/map/pc.h index 58f7a2266..8b1c9a34d 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -795,7 +795,7 @@ struct pc_interface { BEGIN_ZEROED_BLOCK; /* Everything within this block will be memset to 0 when status_defaults() is executed */ unsigned int exp_table[CLASS_COUNT][2][MAX_LEVEL]; - unsigned int max_level[CLASS_COUNT][2]; + int max_level[CLASS_COUNT][2]; unsigned int statp[MAX_LEVEL+1]; unsigned int level_penalty[3][RC_MAX][MAX_LEVEL*2+1]; /* */ -- cgit v1.2.3-60-g2f50