summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-29 13:43:51 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-29 13:43:51 +0000
commit7badbcba4e7ad1c46f0438d1535f77e4cbbc6fd7 (patch)
tree925aa191f7e634469f0ed277ffe6b25c29137f00 /src/map/status.c
parent257315e53a493c10e5931eccca0daf51dd01fa54 (diff)
downloadhercules-7badbcba4e7ad1c46f0438d1535f77e4cbbc6fd7.tar.gz
hercules-7badbcba4e7ad1c46f0438d1535f77e4cbbc6fd7.tar.bz2
hercules-7badbcba4e7ad1c46f0438d1535f77e4cbbc6fd7.tar.xz
hercules-7badbcba4e7ad1c46f0438d1535f77e4cbbc6fd7.zip
* Fixed NULL pointer in status_change_timer (SC_BERSERK), when the HP subtraction causes the HP drop below 100, but does not exceed remaining HP (bugreport:1150, related r8705, r11786 and r12061).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14837 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/status.c b/src/map/status.c
index d9a14dc23..e055c46d3 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -7261,7 +7261,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr data)
case SC_BERSERK:
// 5% every 10 seconds [DracoRPG]
- if(--(sce->val3)>0 && status_charge(bl, sce->val2, 0))
+ if( --( sce->val3 ) > 0 && status_charge(bl, sce->val2, 0) && status->hp > 100 )
{
sc_timer_next(sce->val4+tick, status_change_timer, bl->id, data);
return 0;