summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-11 13:46:25 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-11 13:46:25 +0000
commit16d0302d542a4741f3d63e08e2683831e4df763b (patch)
treeaca66e2b7573616d04e522ad47b36456b958c0cc /src/map/skill.c
parent23af76cb12e4d538894fd8f59246eafbcf025914 (diff)
downloadhercules-16d0302d542a4741f3d63e08e2683831e4df763b.tar.gz
hercules-16d0302d542a4741f3d63e08e2683831e4df763b.tar.bz2
hercules-16d0302d542a4741f3d63e08e2683831e4df763b.tar.xz
hercules-16d0302d542a4741f3d63e08e2683831e4df763b.zip
Follow up r16388, fix for bugreport:6200
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16396 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index f6aef06a2..122a3fb8d 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4105,8 +4105,8 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
for(i = SC_MAXSPELLBOOK; i >= SC_SPELLBOOK1; i--) // List all available spell to be released
if( sc->data[i] ) spell[s++] = i;
- if ( i == 0 )
- break;
+ if ( s == 0 )
+ break;
i = spell[s==1?0:rand()%s];// Random select of spell to be released.
if( s && sc->data[i] ){// Now extract the data from the preserved spell