summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-09-11 01:31:00 +0200
committerHaru <haru@dotalux.com>2016-09-11 01:31:00 +0200
commit643c956ceff2c6a9ecfb59ad0653e1634350d4fb (patch)
treee8f1d0fb69a6ec48833015a806e219ed9cb0ae49 /src/map/script.c
parent2e50931a0efd4620ff45b0d43d7ef336f077d27d (diff)
downloadhercules-643c956ceff2c6a9ecfb59ad0653e1634350d4fb.tar.gz
hercules-643c956ceff2c6a9ecfb59ad0653e1634350d4fb.tar.bz2
hercules-643c956ceff2c6a9ecfb59ad0653e1634350d4fb.tar.xz
hercules-643c956ceff2c6a9ecfb59ad0653e1634350d4fb.zip
Changed GD_MAX check to be non-inclusive
- GD_MAX is not a valid guild skill ID - Fixes Coverity CID 152761 - Follow-up to 0f803e7 Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 7db3736e3..efdc3557b 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -9490,7 +9490,7 @@ BUILDIN(guildskill) {
skill_id = ( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
level = script_getnum(st,3);
- if (skill_id < GD_SKILLBASE || skill_id > GD_MAX)
+ if (skill_id < GD_SKILLBASE || skill_id >= GD_MAX)
return true; // not guild skill
id = skill_id - GD_SKILLBASE;