Browse Source

Small bug fix in read_homunculus_expdb (a warning was always displayed)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8495 54d463be-8e91-2dee-dedb-b68131a5f0ec
toms 18 years ago
parent
commit
7cfbea6671
2 changed files with 2 additions and 1 deletions
  1. 1 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/mercenary.c

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 
 2006/08/26
 2006/08/26
+	* Small bug fix in read_homunculus_expdb (a warning was always displayed) [Toms]
 	* Small adjustment on the mob_ai code which could fix mobs not chasing you
 	* Small adjustment on the mob_ai code which could fix mobs not chasing you
 	  if you hit them from the maximum possible diagonal distance. [Skotlex]
 	  if you hit them from the maximum possible diagonal distance. [Skotlex]
 2006/08/25
 2006/08/25

+ 1 - 1
src/map/mercenary.c

@@ -968,7 +968,7 @@ void read_homunculus_expdb()
 			if (!hexptbl[j++])
 			if (!hexptbl[j++])
 				break;
 				break;
 		}
 		}
-		if (!feof(fp) || hexptbl[MAX_LEVEL - 1])
+		if (hexptbl[MAX_LEVEL - 1]) // Last permitted level have to be 0!
 		{
 		{
 			ShowWarning("read_hexptbl: Reached max level in exp_homun [%d]. Remaining lines were not read.\n ", MAX_LEVEL);
 			ShowWarning("read_hexptbl: Reached max level in exp_homun [%d]. Remaining lines were not read.\n ", MAX_LEVEL);
 			hexptbl[MAX_LEVEL - 1] = 0;
 			hexptbl[MAX_LEVEL - 1] = 0;