summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-24 21:27:50 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-24 21:27:50 +0000
commit105985add2ba326f8e24291027f90c0a374998b1 (patch)
tree1deb0e6a5102c23d38151cdcef81d919229bbaea
parent1ad89559d154eaadc2d8bf0e78068984d6ad7e50 (diff)
downloadhercules-105985add2ba326f8e24291027f90c0a374998b1.tar.gz
hercules-105985add2ba326f8e24291027f90c0a374998b1.tar.bz2
hercules-105985add2ba326f8e24291027f90c0a374998b1.tar.xz
hercules-105985add2ba326f8e24291027f90c0a374998b1.zip
Fix a crash in char_sql/char.c
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@983 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog.txt4
-rw-r--r--src/char_sql/char.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/Changelog.txt b/Changelog.txt
index 815e66128..1e5273e57 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,6 +1,8 @@
Date Added
-01/24
+01/24
+ * Fixed a crash in char_sql/char.c where people were selecting
+ chars before requesting connections [SVN 983] [MouseJstr]
* some G++ compile tweaks and got through several files in the
map server - [SVN 976] [MouseJstr]
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index e4ae162eb..b745ea504 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -2417,6 +2417,9 @@ int parse_char(int fd) {
if (RFIFOREST(fd) < 3)
return 0;
+ if (sd == NULL)
+ return 0;
+
sprintf(tmp_sql, "SELECT `char_id` FROM `%s` WHERE `account_id`='%d' AND `char_num`='%d'",char_db, sd->account_id, RFIFOB(fd, 2));
if (mysql_query(&mysql_handle, tmp_sql)) {
printf("DB server Error - %s\n", mysql_error(&mysql_handle));