summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-16 17:29:23 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-16 17:29:23 +0000
commitf2cd09b51583177a2ef74c3b52f58986b13bedf3 (patch)
tree2bcc537c8171c2d9597bc096cd832dc8c7aca65f /src/map/itemdb.c
parent0b071db9b1c8c475d7bf51700fbb45f6cb49d283 (diff)
downloadhercules-f2cd09b51583177a2ef74c3b52f58986b13bedf3.tar.gz
hercules-f2cd09b51583177a2ef74c3b52f58986b13bedf3.tar.bz2
hercules-f2cd09b51583177a2ef74c3b52f58986b13bedf3.tar.xz
hercules-f2cd09b51583177a2ef74c3b52f58986b13bedf3.zip
- Small change in the random item reading function, may fix @itemdbreload messing up random item searches.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5630 54d463be-8e91-2dee-dedb-b68131a5f0ec
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);