summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-29 18:41:31 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-29 18:41:31 +0000
commit56dc9bf692f21a2655b594af8644ea2dbeaa72be (patch)
treeef01518416b4159b4f8ff350f53e49b2681fb2e0 /src
parenta33f7874d58bbb99fdfc5d07c30e4aabdba91791 (diff)
downloadhercules-56dc9bf692f21a2655b594af8644ea2dbeaa72be.tar.gz
hercules-56dc9bf692f21a2655b594af8644ea2dbeaa72be.tar.bz2
hercules-56dc9bf692f21a2655b594af8644ea2dbeaa72be.tar.xz
hercules-56dc9bf692f21a2655b594af8644ea2dbeaa72be.zip
- Fixed the new npc parsing code not accounting for windows-style line terminators, which as a side effect messed up mapflag parsing if the file had windows-style terminators, which coincidentally was the case for the nopvp file, which unfortunately meant that all towns became pvp!
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9363 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/npc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 7dd0f146c..3af9d5e2e 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2643,7 +2643,7 @@ void npc_parsesrcfile (char *name)
w1[0] = w2[0] = w3[0] = w4[0] = '\0'; //It's best to initialize values
//to prevent passing previously parsed values to the parsers when not all
//fields are specified. [Skotlex]
- if ((count = sscanf(line, "%[^\t\n]\t%[^\t\n]\t%[^\t\n]\t%n%[^\n]", w1, w2, w3, &w4pos, w4)) < 3)
+ if ((count = sscanf(line, "%[^\t\r\n]\t%[^\t\r\n]\t%[^\t\r\n]\t%n%[^\r\n]", w1, w2, w3, &w4pos, w4)) < 3)
{
if ((count = sscanf(line, "%s %s %[^\t]\t %n%[^\n]", w1, w2, w3, &w4pos, w4)) == 4 ||
(count = sscanf(line, "%s %s %s %n%[^\n]\n", w1, w2, w3, &w4pos, w4)) >= 3)