summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 12d434acb..9d64e4184 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -407,6 +407,8 @@ static int itemdb_read_randomitem(void)
char *fn=(char *) data[i].filename;
*pdefault = 0;
+ *pc = 0; //zero the count in case we are reloading. [Skotlex]
+
sprintf(line, "%s/%s", db_path, fn);
if( (fp=fopen(line,"r"))==NULL ){
ShowError("can't read %s\n",line);