From 5e6480cb11403f8f634a1cfc9648c7ec654c0fb8 Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 20 Feb 2006 03:14:49 +0000 Subject: - Fixed Taekwon stances not triggering. - Added atcommand @exp - Added error reporting when add_timer_interval receives a negative/0 interval value. - Fixed a possible infinite recursion bug with splash self skills. - Modified the way firewall_hits_on_undead works, to loop and invoke multiple skill_attacks based on the value. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5338 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/timer.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/timer.c b/src/common/timer.c index 7b7ac5e2c..49b6e18de 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -237,8 +237,15 @@ int add_timer(unsigned int tick,int (*func)(int,unsigned int,int,int), int id, i int add_timer_interval(unsigned int tick, int (*func)(int,unsigned int,int,int), int id, int data, int interval) { - int tid = acquire_timer(); + int tid; + if (interval < 1) { + ShowError("add_timer_interval : function %08x(%s) has invalid interval %d!\n", + (int)func, search_timer_func_list(func)); + return -1; + } + + tid = acquire_timer(); timer_data[tid].tick = tick; timer_data[tid].func = func; timer_data[tid].id = id; -- cgit v1.2.3-70-g09d2