Issue information

Issue ID
#3410
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Jul 22, 2009 10:59
Last Post
Hercules Elf Bot
Apr 19, 2012 9:24
Confirmation
N/A

Hercules Elf Bot - Jul 22, 2009 10:59

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=3410

As was demonstrated by bug #1886: Negative @heal With Large Number Causes Crash, there is an implementation defect in the status_heal/status_damage code, where doing @heal -2147483648 (INT_MIN) will cause an infinite loop. The reason being that -INT_MIN == INT_MIN.

There are existing attempts to patch this. In r13321, checks to @heal were added. However that apparently wasn't enough to stop silly GMs from crashing still (maybe some other command?), and so in r13955 an attempt was made to stop this infinite loop directly in status heal/damage code. But again, due to an implementation mistake, nothing was fixed.

I propose the following:
1. examine the code to see which parts rely on the damage<->heal value inversion behavior
2. rewrite those places to call the proper function
3. get rid of the recursive logic

Hercules Elf Bot - Jan 4, 2012 1:19

Originally posted by [b]Ind[/b]
was fixed in a previous eA revision I assume, I couldn't reproduce.