summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-26 11:15:28 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-26 11:15:28 +0000
commit3f4b200fe96d3f4d3b26920e9caa210537cbaf3d (patch)
treec2db31c5d3a709b9a0377ca150edd29e7fcf976d /src
parent5d35f372f696e3aa3a40734066d5127835baa3d0 (diff)
downloadhercules-3f4b200fe96d3f4d3b26920e9caa210537cbaf3d.tar.gz
hercules-3f4b200fe96d3f4d3b26920e9caa210537cbaf3d.tar.bz2
hercules-3f4b200fe96d3f4d3b26920e9caa210537cbaf3d.tar.xz
hercules-3f4b200fe96d3f4d3b26920e9caa210537cbaf3d.zip
minor @spiritball bugfix, bugreprot:2751
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15285 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/atcommand.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 204656285..7ff900eaf 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -3875,10 +3875,12 @@ ACMD_FUNC(lostskill)
*------------------------------------------*/
ACMD_FUNC(spiritball)
{
- int max_spiritballs = min(ARRAYLENGTH(sd->spirit_timer), 0x7FFF);
+ int max_spiritballs;
int number;
nullpo_retr(-1, sd);
-
+
+ max_spiritballs = min(ARRAYLENGTH(sd->spirit_timer), 0x7FFF);
+
if( !message || !*message || (number = atoi(message)) < 0 || number > max_spiritballs )
{
char msg[CHAT_SIZE_MAX];