--- deliantra/server/common/treasure.C 2006/08/13 17:16:01 1.1 +++ deliantra/server/common/treasure.C 2006/08/28 14:05:24 1.3 @@ -1,7 +1,7 @@ /* * static char *rcs_treasure_c = - * "$Id: treasure.C,v 1.1 2006/08/13 17:16:01 elmex Exp $"; + * "$Id: treasure.C,v 1.3 2006/08/28 14:05:24 root Exp $"; */ /* @@ -1272,7 +1272,7 @@ void init_artifacts(void) { static int has_been_inited=0; - FILE *fp; + FILE *fp_; char filename[MAX_BUF], buf[HUGE_BUF], *cp, *next; artifact *art=NULL; linked_char *tmp; @@ -1284,11 +1284,13 @@ sprintf(filename, "%s/artifacts", settings.datadir); LOG(llevDebug, "Reading artifacts from %s...",filename); - if ((fp = open_and_uncompress(filename, 0, &comp)) == NULL) { + if ((fp_ = open_and_uncompress(filename, 0, &comp)) == NULL) { LOG(llevError, "Can't open %s.\n", filename); return; } + object_thawer fp (fp_); + while (fgets(buf, HUGE_BUF, fp)!=NULL) { if (*buf=='#') continue; if((cp=strchr(buf,'\n'))!=NULL)