diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-23 02:20:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-23 02:20:03 +0300 |
commit | 371293407ca9937a03942a2f8e32f2eb7c87940c (patch) | |
tree | 3cc7f056d64216bd144daabfb774db7e7836cef1 /src/map/quest.c | |
parent | ab9362782312ad81ef1c1d47dcac464607a710a2 (diff) | |
download | evol-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.c | 9 |
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; } |