From 79870f8e41c5fa8d5475a355600c40113e37e2db Mon Sep 17 00:00:00 2001 From: Zido Date: Wed, 12 Jul 2006 22:25:24 +0000 Subject: - Fixed negative value exploit (view changelog) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7647 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/map/pc.c b/src/map/pc.c index d8b8f9bfa..53c953a2c 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1278,8 +1278,10 @@ int pc_bonus(struct map_session_data *sd,int type,int val) status->lhw->atk2+=val; break; case SP_BASE_ATK: - if(sd->state.lr_flag != 2) - status->batk+=val; + if(sd->state.lr_flag != 2) { + if(!(val<0 && ((val-val-val)>status->batk))) + status->batk+=val; + } break; case SP_MATK1: if(sd->state.lr_flag != 2) -- cgit v1.2.3-70-g09d2