diff options
author | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-01-12 17:21:41 +0000 |
---|---|---|
committer | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-01-12 17:21:41 +0000 |
commit | 8ee1fca77667a6b6eb6193f41c7b0c8802b0144b (patch) | |
tree | 26a64737a986d2b4dfba3963630e2beb29995ef4 /src/map/npc.c | |
parent | c6ca79ad9e7a897e3598bede517b5b1e829aea7c (diff) | |
download | hercules-8ee1fca77667a6b6eb6193f41c7b0c8802b0144b.tar.gz hercules-8ee1fca77667a6b6eb6193f41c7b0c8802b0144b.tar.bz2 hercules-8ee1fca77667a6b6eb6193f41c7b0c8802b0144b.tar.xz hercules-8ee1fca77667a6b6eb6193f41c7b0c8802b0144b.zip |
* Modified npc_parsesrcfile to read the file as binary and let sv_parse handle LF/CRLF line endings.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12059 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 0f0c09e62..f2601e1e9 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2523,7 +2523,7 @@ void npc_parsesrcfile(const char* filepath) const char* p; // read whole file to buffer - fp = fopen(filepath, "rt"); + fp = fopen(filepath, "rb"); if( fp == NULL ) { ShowError("npc_parsesrcfile: File not found '%s'.\n", filepath); @@ -2553,7 +2553,7 @@ void npc_parsesrcfile(const char* filepath) lines++; // w1<TAB>w2<TAB>w3<TAB>w4 - count = sv_parse(p, len+buffer-p, 0, '\t', pos, ARRAYLENGTH(pos), SV_TERMINATE_LF); + count = sv_parse(p, len+buffer-p, 0, '\t', pos, ARRAYLENGTH(pos), SV_TERMINATE_LF|SV_TERMINATE_CRLF); if( count < 0 ) { ShowError("npc_parsesrcfile: Parse error in file '%s', line '%d'. Stopping...\n", filepath, strline(buffer,p-buffer)); |