summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-11 08:34:34 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-11 08:34:34 +0000
commit5ca093dad2f2d213f7cd7d057c351dddf382a958 (patch)
tree778a8d4c67ee158d3e4be255137758d86b139b8e
parent0a6590d13fb2d1aa223b82c3eb5573d10b1448a4 (diff)
downloadhercules-5ca093dad2f2d213f7cd7d057c351dddf382a958.tar.gz
hercules-5ca093dad2f2d213f7cd7d057c351dddf382a958.tar.bz2
hercules-5ca093dad2f2d213f7cd7d057c351dddf382a958.tar.xz
hercules-5ca093dad2f2d213f7cd7d057c351dddf382a958.zip
- Fixed the script engine not parsing strings in multibyte charsets correctly (should have been done in r9532).
Ref: http://www.eathena.ws/board/index.php?showtopic=132004 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9642 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/script.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 18c1e04c0..8ae79e8e2 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,8 @@ 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.
2007/01/11
+ * Fixed the script engine not parsing strings in multibyte charsets
+ correctly (should have been done in r9532).
* Console plugin working when built as Windows native. [FlavioJS]
2007/01/10
* Combined most of the txt/sql mobdb reading code [ultramage]
diff --git a/src/map/script.c b/src/map/script.c
index 9721f12d0..401653fdc 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -723,10 +723,10 @@ const char* parse_simpleexpr(const char *p)
} else if(*p=='"'){
add_scriptc(C_STR);
p++;
- while(*p && *p!='"'){
- if(p[-1]<=0x7e && *p=='\\')
+ while( *p && *p != '"' ){
+ if( (unsigned char)p[-1] <= 0x7e && *p == '\\' )
p++;
- else if(*p=='\n')
+ else if( *p == '\n' )
disp_error_message("parse_simpleexpr: unexpected newline @ string",p);
add_scriptb(*p++);
}