summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@users.noreply.github.com>2015-01-17 21:00:26 -0200
committershennetsind <shennetsind@users.noreply.github.com>2015-01-17 21:00:26 -0200
commit9638e8e3730baea5b28670f8d38dbd417777c976 (patch)
tree09b347f4bdcef20893db0877c7f06e88d29b7bd1 /src/char/char.c
parenta3c4d675ba19df385be5d1e3966c61de7186da57 (diff)
parent3bf50615cd8a85bec21d0dab1ecf39a26c0e104b (diff)
downloadhercules-9638e8e3730baea5b28670f8d38dbd417777c976.tar.gz
hercules-9638e8e3730baea5b28670f8d38dbd417777c976.tar.bz2
hercules-9638e8e3730baea5b28670f8d38dbd417777c976.tar.xz
hercules-9638e8e3730baea5b28670f8d38dbd417777c976.zip
Merge pull request #444 from 4144/coverity
some fixes for different issues
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 1d9d1d65c..f1bacbeb3 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -1461,7 +1461,7 @@ bool char_char_slotchange(struct char_session_data *sd, int fd, unsigned short f
struct mmo_charstatus char_dat;
int from_id = 0;
- if( from > MAX_CHARS || to > MAX_CHARS || ( sd->char_slots && to > sd->char_slots ) || sd->found_char[from] <= 0 )
+ if( from >= MAX_CHARS || to >= MAX_CHARS || ( sd->char_slots && to > sd->char_slots ) || sd->found_char[from] <= 0 )
return false;
if( !chr->mmo_char_fromsql(sd->found_char[from], &char_dat, false) ) // Only the short data is needed.