summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-02-27 05:20:40 +0100
committerHaru <haru@dotalux.com>2016-02-27 14:30:02 +0100
commit33d37ff161f724b0bbcde4eedf32c528d3576c90 (patch)
tree9dad669d1085a95344ece61161ca87e2a5cf7aa5 /src/map/status.c
parent8748ee58a47d8b1c6c88ebb1e18806921d37b746 (diff)
downloadhercules-33d37ff161f724b0bbcde4eedf32c528d3576c90.tar.gz
hercules-33d37ff161f724b0bbcde4eedf32c528d3576c90.tar.bz2
hercules-33d37ff161f724b0bbcde4eedf32c528d3576c90.tar.xz
hercules-33d37ff161f724b0bbcde4eedf32c528d3576c90.zip
Corrected wrong variable type of struct status_change_data::tick
- The variable should be signed, since it uses the value -1 to indicate infinite duration (and it's stored as signed in the database). - Added #define for the special value -1 (INFINITE_DURATION). - This fixes an issue causing status changes to fail being saved to database (thanks to Michi for reporting it). - Related to commit 8dc75721. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/status.c b/src/map/status.c
index c4c0e39a2..bef808d11 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -12299,8 +12299,9 @@ int status_change_spread( struct block_list *src, struct block_list *bl ) {
if (td == NULL || td->func != status->change_timer || DIFF_TICK(td->tick,tick) < 0)
continue;
data.tick = DIFF_TICK32(td->tick,tick);
- } else
- data.tick = INVALID_TIMER;
+ } else {
+ data.tick = INFINITE_DURATION;
+ }
break;
// Special cases
case SC_POISON: