summaryrefslogtreecommitdiff
path: root/src/char_sql/int_guild.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-29 17:22:35 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-29 17:22:35 +0000
commit70028b45b1a73422867cf1432ea1dc29a613fc98 (patch)
tree9f6b686e2cbb09a5825a0ea48be032a3d2a30a7f /src/char_sql/int_guild.c
parent2d5a97a322c5c3d9665ba96deb5daa4d6188c28d (diff)
downloadhercules-70028b45b1a73422867cf1432ea1dc29a613fc98.tar.gz
hercules-70028b45b1a73422867cf1432ea1dc29a613fc98.tar.bz2
hercules-70028b45b1a73422867cf1432ea1dc29a613fc98.tar.xz
hercules-70028b45b1a73422867cf1432ea1dc29a613fc98.zip
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@859 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/int_guild.c')
-rw-r--r--src/char_sql/int_guild.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c
index 030201aa4..5fee88511 100644
--- a/src/char_sql/int_guild.c
+++ b/src/char_sql/int_guild.c
@@ -1294,8 +1294,10 @@ int mapif_parse_GuildChangeMemberInfoShort(int fd,int guild_id,
if( g->member[i].online )
g->connect_member++;
}
- // 平均レベル
- g->average_lv=alv/c;
+
+ if (c)
+ // 平均レベル
+ g->average_lv=alv/c;
sprintf(tmp_sql, "UPDATE `%s` SET `connect_member`=%d,`average_lv`=%d WHERE `guild_id`='%d'", guild_db, g->connect_member, g->average_lv, g->guild_id);
if(mysql_query(&mysql_handle, tmp_sql) )