summaryrefslogtreecommitdiff
path: root/src/char/int_guild.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/char/int_guild.c')
-rw-r--r--src/char/int_guild.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index d2e74ee1d..a4d91ecd6 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -56,7 +56,7 @@ static int guild_save_timer(int tid, unsigned int tick, int id, intptr_t data)
if( last_id == 0 ) //Save the first guild in the list.
state = 1;
- for( g = (struct guild*)iter->first(iter,&key); iter->exists(iter); g = (struct guild*)iter->next(iter,&key) )
+ for( g = db_data2ptr(iter->first(iter, &key)); dbi_exists(iter); g = db_data2ptr(iter->next(iter, &key)) )
{
if( state == 0 && g->guild_id == last_id )
state++; //Save next guild in the list.
@@ -746,9 +746,12 @@ int inter_guild_sql_init(void)
return 0;
}
-static int guild_db_final(DBKey key, void *data, va_list ap)
+/**
+ * @see DBApply
+ */
+static int guild_db_final(DBKey key, DBData *data, va_list ap)
{
- struct guild *g = (struct guild*)data;
+ struct guild *g = db_data2ptr(data);
if (g->save_flag&GS_MASK) {
inter_guild_tosql(g, g->save_flag&GS_MASK);
return 1;