diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-05-29 13:43:51 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-05-29 13:43:51 +0000 |
commit | 7badbcba4e7ad1c46f0438d1535f77e4cbbc6fd7 (patch) | |
tree | 925aa191f7e634469f0ed277ffe6b25c29137f00 | |
parent | 257315e53a493c10e5931eccca0daf51dd01fa54 (diff) | |
download | hercules-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
-rw-r--r-- | Changelog-Trunk.txt | 1 | ||||
-rw-r--r-- | src/map/status.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index c67753689..85a685337 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -1,6 +1,7 @@ Date Added 2011/05/29 + * 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). [Ai4rei] * Updated script commands 'npcshopitem', 'npcshopadditem' and 'npcshopdelitem' to support cashshops as well (bugreport:4928). [Ai4rei] * Fixed players could add themselves to their friendslist through their clones or WPE (bugreport:4909). [Ai4rei] * Fixed bonus 'bHPDrainValue' on left hand would work as right hand bonus, when specified with 'bonus' rather than 'bonus2' (bugreport:4939, since r6221). [Ai4rei] 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; |