summaryrefslogtreecommitdiff
path: root/src/map/quest.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-23 02:20:03 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-23 02:20:03 +0300
commit371293407ca9937a03942a2f8e32f2eb7c87940c (patch)
tree3cc7f056d64216bd144daabfb774db7e7836cef1 /src/map/quest.c
parentab9362782312ad81ef1c1d47dcac464607a710a2 (diff)
downloadevol-hercules-371293407ca9937a03942a2f8e32f2eb7c87940c.tar.gz
evol-hercules-371293407ca9937a03942a2f8e32f2eb7c87940c.tar.bz2
evol-hercules-371293407ca9937a03942a2f8e32f2eb7c87940c.tar.xz
evol-hercules-371293407ca9937a03942a2f8e32f2eb7c87940c.zip
Fix hookStop usage.
Diffstat (limited to 'src/map/quest.c')
-rw-r--r--src/map/quest.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map/quest.c b/src/map/quest.c
index de77bcc..a65e08a 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -16,7 +16,6 @@
int equest_read_db(void)
{
- hookStop();
FILE *fp;
char line[1024];
int i, count = 0;
@@ -24,12 +23,15 @@ int equest_read_db(void)
struct quest_db entry;
sprintf(line, "%s/quest_db.txt", map->db_path);
- if ((fp=fopen(line,"r"))==NULL) {
+ if ((fp = fopen(line, "r")) == NULL)
+ {
ShowError("can't read %s\n", line);
+ hookStop();
return -1;
}
- while (fgets(line, sizeof(line), fp)) {
+ while (fgets(line, sizeof(line), fp))
+ {
if (line[0]=='/' && line[1]=='/')
continue;
memset(str,0,sizeof(str));
@@ -77,5 +79,6 @@ int equest_read_db(void)
}
fclose(fp);
ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, "quest_db.txt");
+ hookStop();
return 0;
}