summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-03 08:40:24 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-03 08:40:24 +0000
commit8bd7139e1a25f842dd460937287f50f0b7fb6b5b (patch)
tree530bc04509fd7dab0324b07b211b66f64e511b83
parentc535a97d4832b1ed485ec129f941aa89fa3fbd3d (diff)
downloadhercules-8bd7139e1a25f842dd460937287f50f0b7fb6b5b.tar.gz
hercules-8bd7139e1a25f842dd460937287f50f0b7fb6b5b.tar.bz2
hercules-8bd7139e1a25f842dd460937287f50f0b7fb6b5b.tar.xz
hercules-8bd7139e1a25f842dd460937287f50f0b7fb6b5b.zip
- Fixed typo in script.c
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5443 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/script.c22
-rw-r--r--vcproj-7.1/map-server_sql.vcproj2
2 files changed, 12 insertions, 12 deletions
diff --git a/src/map/script.c b/src/map/script.c
index d32a6492b..49b289186 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -10532,28 +10532,28 @@ static int script_load_mapreg(void)
return -1;
}
ShowInfo("Success! Returning results ...\n");
- mapregsql_res = mysql_store_result(&mmysql_handle);
- if (mapregsql_res) {
- while ((mapregsql_row = mysql_fetch_row(mapregsql_res))) {
+ sql_res = mysql_store_result(&mmysql_handle);
+ if (sql_res) {
+ while ((sql_row = mysql_fetch_row(sql_res))) {
char buf1[33], *p = NULL;
int i,v,s;
- strcpy(buf1,mapregsql_row[0]);
+ strcpy(buf1,sql_row[0]);
if( buf1[strlen(buf1)-1]=='$' ){
- i = atoi(mapregsql_row[1]);
- p=(char *)aCallocA(strlen(mapregsql_row[2]) + 1,sizeof(char));
- strcpy(p,mapregsql_row[2]);
+ i = atoi(sql_row[1]);
+ p=(char *)aCallocA(strlen(sql_row[2]) + 1,sizeof(char));
+ strcpy(p,sql_row[2]);
s= add_str((unsigned char *) buf1);
idb_put(mapregstr_db,(i<<24)|s,p);
}else{
s= add_str((unsigned char *) buf1);
- v= atoi(mapregsql_row[2]);
- i = atoi(mapregsql_row[1]);
+ v= atoi(sql_row[2]);
+ i = atoi(sql_row[1]);
idb_put(mapreg_db,(i<<24)|s,(void *)v);
}
}
}
ShowInfo("Freeing results...\n");
- mysql_free_result(mapregsql_res);
+ mysql_free_result(sql_res);
mapreg_dirty=0;
perfomance = (gettick_nocache() - perfomance) / 1000;
ShowInfo("SQL Mapreg Loading Completed Under %d Seconds.\n",perfomance);
@@ -10582,7 +10582,7 @@ static int script_save_mapreg_intsub(DBKey key,void *data,va_list ap)
char *name=str_buf+str_data[num].str;
if ( name[1] != '@') {
sprintf(tmp_sql,"UPDATE `%s` SET `%s`='%d' WHERE `%s`='%s' AND `%s`='%d'",mapregsql_db,mapregsql_db_value,(int)data,mapregsql_db_varname,name,mapregsql_db_index,i);
- if(mysql_query(&mmyregsql_handle, tmp_sql) ) {
+ if(mysql_query(&mmysql_handle, tmp_sql) ) {
ShowSQL("DB error - %s\n",mysql_error(&mmysql_handle));
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
}
diff --git a/vcproj-7.1/map-server_sql.vcproj b/vcproj-7.1/map-server_sql.vcproj
index 646c2eb42..bd809ae37 100644
--- a/vcproj-7.1/map-server_sql.vcproj
+++ b/vcproj-7.1/map-server_sql.vcproj
@@ -20,7 +20,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WIN32;PACKETVER=6;NEW_006b;__WIN32;LOCALZLIB;PCRE_SUPPORT;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WIN32;PACKETVER=6;NEW_006b;__WIN32;LOCALZLIB;PCRE_SUPPORT;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;MAPREGSQL"
GeneratePreprocessedFile="0"
MinimalRebuild="FALSE"
BasicRuntimeChecks="0"