diff options
author | toms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-04-22 15:13:32 +0000 |
---|---|---|
committer | toms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-04-22 15:13:32 +0000 |
commit | 3637b1367f245b7125c002f1dbe6a5da1b9143e7 (patch) | |
tree | a6310def797aa301d297a2b68a4f19ff9b98277b /src | |
parent | bc9e0854a2c7336c6f7b4a388b5ff00b9f4865e8 (diff) | |
download | hercules-3637b1367f245b7125c002f1dbe6a5da1b9143e7.tar.gz hercules-3637b1367f245b7125c002f1dbe6a5da1b9143e7.tar.bz2 hercules-3637b1367f245b7125c002f1dbe6a5da1b9143e7.tar.xz hercules-3637b1367f245b7125c002f1dbe6a5da1b9143e7.zip |
Fixed a "bug" in sv_readdb under windows and cygwin configured as "Unix/binary" for text files ('\r' is read and empty lines are not skipped) bugreport:1382 bugreport:1401
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12634 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/common/strlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/strlib.c b/src/common/strlib.c index 8947821df..b6ff4b279 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -829,7 +829,7 @@ bool sv_readdb(const char* directory, const char* filename, char delim, int minc continue; //TODO: strip trailing // comment //TODO: strip trailing whitespace - if( line[0] == '\0' || line[0] == '\n' ) + if( line[0] == '\0' || line[0] == '\n' || line[0] == '\r') continue; columns = sv_split(line, strlen(line), 0, delim, fields, ARRAYLENGTH(fields), (e_svopt)(SV_TERMINATE_LF|SV_TERMINATE_CRLF)); |