diff options
author | Haru <haru@dotalux.com> | 2013-09-21 10:59:19 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2013-09-21 10:59:19 +0200 |
commit | 0d12201adecaf21fccfee8e62a2d2a5582535ae3 (patch) | |
tree | 950c673626548818c1ea8abd0165541d40192da8 /src/map/script.c | |
parent | 51241f66ad6e78cf56b91c41e524c00a1d5abeb2 (diff) | |
download | hercules-0d12201adecaf21fccfee8e62a2d2a5582535ae3.tar.gz hercules-0d12201adecaf21fccfee8e62a2d2a5582535ae3.tar.bz2 hercules-0d12201adecaf21fccfee8e62a2d2a5582535ae3.tar.xz hercules-0d12201adecaf21fccfee8e62a2d2a5582535ae3.zip |
Corrected invalid values assigned to enum homun_type variables
- Fixes a warning in clang-5.0.0 (and a potentially incorrect/undefined
behavior of the related code)
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c index 7ac638848..87d2b475c 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -9797,16 +9797,16 @@ BUILDIN(homunculus_mutate) { if( sd == NULL || sd->hd == NULL ) return true; - if(script_hasdata(st,2)) + if( script_hasdata(st,2) ) homun_id = script_getnum(st,2); else homun_id = 6048 + (rnd() % 4); - if(homun_alive(sd->hd)) { + if( homun_alive(sd->hd) ) { m_class = homun->class2type(sd->hd->homunculus.class_); m_id = homun->class2type(homun_id); - if ( m_class != -1 && m_id != -1 && m_class == HT_EVO && m_id == HT_S && sd->hd->homunculus.level >= 99 ) + if( m_class != HT_INVALID && m_id != HT_INVALID && m_class == HT_EVO && m_id == HT_S && sd->hd->homunculus.level >= 99 ) homun->mutate(sd->hd, homun_id); else clif->emotion(&sd->hd->bl, E_SWT); |