Fixed a bug in the timer code which made it impossible to delete a timer with id '0' (since pre-svn, still present in jAthena).
Fixed wrong order of parameters in a ShowWarning call when freeing a locked DBMap, which caused a segfault when executed (since initial implementation in r4859). git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12854 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
159e55e3d1
commit
290ca7eec3
@ -2052,7 +2052,7 @@ static int db_obj_vdestroy(DBMap* self, DBApply func, va_list args)
|
|||||||
if (db->free_lock)
|
if (db->free_lock)
|
||||||
ShowWarning("db_vdestroy: Database is still in use, %u lock(s) left. Continuing database destruction.\n"
|
ShowWarning("db_vdestroy: Database is still in use, %u lock(s) left. Continuing database destruction.\n"
|
||||||
"Database allocated at %s:%d\n",
|
"Database allocated at %s:%d\n",
|
||||||
db->alloc_file, db->alloc_line, db->free_lock);
|
db->free_lock, db->alloc_file, db->alloc_line);
|
||||||
|
|
||||||
#ifdef DB_ENABLE_STATS
|
#ifdef DB_ENABLE_STATS
|
||||||
switch (db->type) {
|
switch (db->type) {
|
||||||
|
@ -283,7 +283,7 @@ struct TimerData* get_timer(int tid)
|
|||||||
/// Returns 0 on success, < 0 on failure.
|
/// Returns 0 on success, < 0 on failure.
|
||||||
int delete_timer(int tid, TimerFunc func)
|
int delete_timer(int tid, TimerFunc func)
|
||||||
{
|
{
|
||||||
if( tid <= 0 || tid >= timer_data_num ) {
|
if( tid < 0 || tid >= timer_data_num ) {
|
||||||
ShowError("delete_timer error : no such timer %d (%08x(%s))\n", tid, (int)func, search_timer_func_list(func));
|
ShowError("delete_timer error : no such timer %d (%08x(%s))\n", tid, (int)func, search_timer_func_list(func));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user