Explorar o código

Fixed "warning: long unsigned int format, unsigned int arg" in parse_login (login_sql\login.c)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7941 54d463be-8e91-2dee-dedb-b68131a5f0ec
toms %!s(int64=19) %!d(string=hai) anos
pai
achega
bf650446b0
Modificáronse 2 ficheiros con 3 adicións e 2 borrados
  1. 1 0
      Changelog-Trunk.txt
  2. 2 2
      src/login_sql/login.c

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ 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.
 
 2006/07/28
+	* Fixed "warning: long unsigned int format, unsigned int arg" in parse_login (login_sql\login.c) [Toms]
 	* Fixed sign warnings in login/login.c [Toms]
 	* Fixed "conversion from 'double' to 'int', possible loss of data" [Toms]
 	* Fixed "warning: redefinition of [ushort/uint/ulong]" [Toms]

+ 2 - 2
src/login_sql/login.c

@@ -1767,8 +1767,8 @@ int parse_login(int fd) {
 					}
 				} //End login log of error.
 				if ((result == 1) && (dynamic_pass_failure_ban != 0) && log_login){	// failed password
-					sprintf(tmpsql,"SELECT count(*) FROM `%s` WHERE `ip` = '%lu' AND `rcode` = '1' AND `time` > NOW() - INTERVAL %d MINUTE",
-						loginlog_db,ntohl(ipl), dynamic_pass_failure_ban_time);	//how many times filed account? in one ip.
+					sprintf(tmpsql,"SELECT count(*) FROM `%s` WHERE `ip` = '%u' AND `rcode` = '1' AND `time` > NOW() - INTERVAL %d MINUTE",
+						loginlog_db,(unsigned int)ntohl(ipl), dynamic_pass_failure_ban_time);	//how many times filed account? in one ip.
 					if(mysql_query(&mysql_handle, tmpsql)) {
 						ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
 						ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);