summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-30 09:14:58 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-30 09:14:58 +0000
commite34596082e7f202f224218de135d5f26fb3070a5 (patch)
treedcb5580289da492d0836d8faa326fb808b08f03d
parentd0397b495f1f18b904174f7ee174b75af608cbcc (diff)
downloadhercules-e34596082e7f202f224218de135d5f26fb3070a5.tar.gz
hercules-e34596082e7f202f224218de135d5f26fb3070a5.tar.bz2
hercules-e34596082e7f202f224218de135d5f26fb3070a5.tar.xz
hercules-e34596082e7f202f224218de135d5f26fb3070a5.zip
- Fixed a serious zeny exploid on scripts. Please update!!
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12153 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/script.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 60672e5e7..0b4435351 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -4669,7 +4669,10 @@ BUILDIN_FUNC(input)
if( postfix == '$' )
set_reg(st,sd,num,name,(void*)sd->npc_str,script_getref(st,2));
else
+ {
+ sd->npc_amount = cap_value(sd->npc_amount, 0, INT_MAX);
set_reg(st,sd,num,name,(void*)sd->npc_amount,script_getref(st,2));
+ }
}
return 0;
}