Forráskód Böngészése

Resolved some string issues

aleos89 5 éve
szülő
commit
9265732e51
2 módosított fájl, 4 hozzáadás és 4 törlés
  1. 2 2
      src/char/char.cpp
  2. 2 2
      src/char/int_clan.cpp

+ 2 - 2
src/char/char.cpp

@@ -2306,8 +2306,8 @@ bool char_checkdb(void){
 		charserv_table(clan_table), charserv_table(clan_alliance_table), charserv_table(mail_attachment_table), charserv_table(achievement_table),
 	};
 	ShowInfo("Start checking DB integrity\n");
-	for (i=0; i<ARRAYLENGTH(sqltable); i++){ //check if they all exist and we can acces them in sql-server
-		if( SQL_ERROR == Sql_Query(sql_handle, "SELECT 1 FROM `%s` LIMIT 1;", sqltable[i]) ){
+	for (i=0; i<ARRAYLENGTH(sqltable); i++){ //check if they all exist and we can access them in sql-server
+		if( SQL_ERROR == Sql_Query(sql_handle, "SELECT 1 FROM `%s` LIMIT 1;", sqltable[i].c_str()) ){
 			Sql_ShowDebug(sql_handle);
 			return false;
 		}

+ 2 - 2
src/char/int_clan.cpp

@@ -71,7 +71,7 @@ struct clan* inter_clan_fromsql(int clan_id){
 		clan->max_member = MAX_CLAN;
 	}
 
-	if( SQL_ERROR == Sql_Query(sql_handle, "SELECT `opposition`,`alliance_id`,`name` FROM `%s` WHERE `clan_id`='%d'", schema_config.clan_alliance_table, clan_id) ){
+	if( SQL_ERROR == Sql_Query(sql_handle, "SELECT `opposition`,`alliance_id`,`name` FROM `%s` WHERE `clan_id`='%d'", charserv_table(clan_alliance_table), clan_id) ){
 		Sql_ShowDebug(sql_handle);
 		aFree(clan);
 		return NULL;
@@ -209,7 +209,7 @@ int inter_clan_init(void){
 
 	clan_db = idb_alloc(DB_OPT_RELEASE_DATA);
 
-	if( SQL_ERROR == Sql_Query( sql_handle, "SELECT `clan_id` FROM `%s`", schema_config.clan_table ) ){
+	if( SQL_ERROR == Sql_Query( sql_handle, "SELECT `clan_id` FROM `%s`", charserv_table(clan_table) ) ){
 		Sql_ShowDebug(sql_handle);
 		return 1;
 	}