From 6e1980bf17132d7540832226aa33512e95e7a261 Mon Sep 17 00:00:00 2001 From: Haru Date: Mon, 11 Nov 2013 06:32:58 +0100 Subject: 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 --- src/map/script.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/map') 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. -- cgit v1.2.3-70-g09d2