From c356b3a461ae6cb9ece2a9119360c7d5006550d1 Mon Sep 17 00:00:00 2001 From: ultramage Date: Fri, 19 Jan 2007 17:04:12 +0000 Subject: [PATCH] Fixed a client crash during SQL char selection if you for some reason had more than 9 characters in your account git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9674 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 3 +++ src/char_sql/char.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index edc2e6dee8..d999a20860 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,9 @@ 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. 2007/01/19 + * Fixed a client crash during SQL char selection if you for some reason had + more than 9 characters in your account (thanks to Daegaladh) [ultramage] + - note that the TXT version already guards against this since long ago * Merged Rayce's cleanups of the script engine that account for duplicate labels, non-numeric labels and makes the engine case-insensitive towards keywords like if/case/switch/etc/ diff --git a/src/char_sql/char.c b/src/char_sql/char.c index 5289694d85..4c1358312c 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -1686,7 +1686,7 @@ int mmo_char_send006b(int fd, struct char_session_data *sd) { set_char_online(-1, 99,sd->account_id); //search char. - sprintf(tmp_sql, "SELECT `char_id` FROM `%s` WHERE `account_id` = '%d'",char_db, sd->account_id); + sprintf(tmp_sql, "SELECT `char_id` FROM `%s` WHERE `account_id` = '%d' AND `char_num` < '9'",char_db, sd->account_id); if (mysql_query(&mysql_handle, tmp_sql)) { ShowSQL("DB error - %s\n",mysql_error(&mysql_handle)); ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);