From ceaccb3f3fe96f7a7e7fbce3fe1652d4b980cffc Mon Sep 17 00:00:00 2001 From: Lupus Date: Fri, 17 Dec 2004 16:37:23 +0000 Subject: FIXED! Removed Freya's code: "added null pointer check from freya" it caused NPC bugs: OnTime, OnInit etc sorry 8) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@596 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog.txt | 2 ++ src/common/db.c | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 647006597..135de68d0 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,5 +1,7 @@ Date Added 12/17 + * db.c: Fixed probs with OnInit, OnTime, and etc NPC probs + Just reverted it back. [Lupus] * Fixed warning message in db.c line 445 [MC Cameri] * Added #effect, removed @chareffect [MC Cameri] * Reverted a change in map.c causing problems, sorry >.< [celest] diff --git a/src/common/db.c b/src/common/db.c index 95a9b3578..8996dda80 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -441,11 +441,12 @@ void db_foreach(struct dbt *table,int (*func)(void*,void*,va_list),...) continue; sp=0; while(1){ - if (!p->data) { - printf("Warning: no data for key %d in db_foreach (db.c) !\n",(int)p->key); - } else { - func(p->key, p->data, ap); - } + //reverted it back. sorry that brought thios bug from Freya [Lupus] + //if (!p->data) { + // printf("Warning: no data for key %d in db_foreach (db.c) !\n",(int)p->key); + //} else { + func(p->key, p->data, ap); + //} if((pn=p->left)!=NULL){ if(p->right){ stack[sp++]=p->right; -- cgit v1.2.3-70-g09d2