summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-17 22:36:52 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-18 01:47:52 +0300
commit1ea16746b1330656e152278a7192e5b7adef0539 (patch)
treeba39cd973386265febe75fbe831e161d0355b02b /src/char/char.c
parentf0ea100d5ccc03d8f94b67ea9d3ffa82fcd937b1 (diff)
downloadhercules-1ea16746b1330656e152278a7192e5b7adef0539.tar.gz
hercules-1ea16746b1330656e152278a7192e5b7adef0539.tar.bz2
hercules-1ea16746b1330656e152278a7192e5b7adef0539.tar.xz
hercules-1ea16746b1330656e152278a7192e5b7adef0539.zip
Add some fixes to char server.
Found by coverity scan.
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.