summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-11-11 06:32:58 +0100
committerHaru <haru@dotalux.com>2013-11-11 06:33:57 +0100
commit6e1980bf17132d7540832226aa33512e95e7a261 (patch)
treef34a4daefed15b2475afbcfc35ebbcb842cb74e5
parent24fb73c653388c7d76fcd0a0bcc08b4af4c5e9cb (diff)
downloadhercules-6e1980bf17132d7540832226aa33512e95e7a261.tar.gz
hercules-6e1980bf17132d7540832226aa33512e95e7a261.tar.bz2
hercules-6e1980bf17132d7540832226aa33512e95e7a261.tar.xz
hercules-6e1980bf17132d7540832226aa33512e95e7a261.zip
Fixed MSVC compile error in ce6c4c63a3a5c1516780f2eac978d02820a8dc0b
- Fixed bugreport:7818, thanks to sevenzz23 http://hercules.ws/board/tracker/issue-7818-error-when-compiling/ Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r--src/map/script.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 3647365af..414c2e758 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -388,9 +388,10 @@ bool script_local_casecheck_add_str(const char *p, int h) {
if( script->local_casecheck_str_hash[h] == 0 ) { //empty bucket, add new node here
script->local_casecheck_str_hash[h] = script->local_casecheck_str_num;
} else {
+ const char *s = NULL;
for( i = script->local_casecheck_str_hash[h]; ; i = script->local_casecheck_str_data[i].next ) {
Assert( i >= 0 && i < script->local_casecheck_str_size );
- const char *s = script->local_casecheck_str_buf+script->local_casecheck_str_data[i].str;
+ s = script->local_casecheck_str_buf+script->local_casecheck_str_data[i].str;
if( strcasecmp(s,p) == 0 ) {
if ( strcmp(s,p) != 0 ) {
DeprecationWarning2("script_add_str", p, s, script->parser_current_file);
@@ -433,8 +434,8 @@ bool script_local_casecheck_add_str(const char *p, int h) {
script->local_casecheck_str_pos += len+1;
script->local_casecheck_str_num++;
- return false;
#endif // ENABLE_CASE_CHECK
+ return false;
}
/// Stores a copy of the string and returns its id.