summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-27 05:12:41 +0000
committerbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-27 05:12:41 +0000
commit8c5bdba41e4f1b49d55f58c63f82fbe022b05e8c (patch)
tree9f49a75aee868bdea420c351ef33a1e9a89edc7b
parent4f1efdf474a048cf3aa4c2830b7036ee21d7e2ea (diff)
downloadhercules-8c5bdba41e4f1b49d55f58c63f82fbe022b05e8c.tar.gz
hercules-8c5bdba41e4f1b49d55f58c63f82fbe022b05e8c.tar.bz2
hercules-8c5bdba41e4f1b49d55f58c63f82fbe022b05e8c.tar.xz
hercules-8c5bdba41e4f1b49d55f58c63f82fbe022b05e8c.zip
- read_elementaldb: skip blank lines.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16710 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--db/elemental_db.txt2
-rw-r--r--db/elemental_skill_db.txt2
-rw-r--r--src/map/elemental.c3
3 files changed, 5 insertions, 2 deletions
diff --git a/db/elemental_db.txt b/db/elemental_db.txt
index d3eb81f4a..81c0d4836 100644
--- a/db/elemental_db.txt
+++ b/db/elemental_db.txt
@@ -28,4 +28,4 @@
//2122,EL_VENTUS_L,Ventus ,100,10000,1000 ,4,1000,1000 ,50,50, 100,100,100,100,100,100, 10,12,2,0,84,200,504,1020,360
//2123,EL_TERA_S,Tera ,100,5000,500 ,1,250,250 ,10,10, 25,25,25,25,25,25, 10,12,0,0,82,200,504,1020,360
//2124,EL_TERA_M,Tera ,100,7500,750 ,1,500,500 ,25,25, 50,50,50,50,50,50, 10,12,1,0,82,200,504,1020,360
-//2125,EL_TERA_L,Tera ,100,10000,1000 ,1,1000,1000 ,50,50, 100,100,100,100,100,100, 10,12,2,0,82,200,504,1020,360 \ No newline at end of file
+//2125,EL_TERA_L,Tera ,100,10000,1000 ,1,1000,1000 ,50,50, 100,100,100,100,100,100, 10,12,2,0,82,200,504,1020,360
diff --git a/db/elemental_skill_db.txt b/db/elemental_skill_db.txt
index 903f5d22f..a0852e5f3 100644
--- a/db/elemental_skill_db.txt
+++ b/db/elemental_skill_db.txt
@@ -52,4 +52,4 @@
// EL_TERA_L
2125,8424,1,1 //EL_UPHEAVAL,Upheaval
2125,8412,1,2 //EL_POWER_OF_GAIA,Power of Gaia
-2125,8442,1,4 //EL_STONE_RAIN,Stone Rain \ No newline at end of file
+2125,8442,1,4 //EL_STONE_RAIN,Stone Rain
diff --git a/src/map/elemental.c b/src/map/elemental.c
index ae3c738d8..be260a0b9 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -671,6 +671,9 @@ int read_elementaldb(void) {
if( line[0] == '/' && line[1] == '/' )
continue;
+ if( line[0] == '\0' || line[0] == '\n' || line[0] == '\r')
+ continue;
+
i = 0;
p = strtok(line, ",");
while( p != NULL && i < 26 ) {