summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-18 11:38:19 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-18 11:38:19 +0000
commit65148fe27a9957558c924772164fb35e1174c2ea (patch)
treee78789073dd01aa9cb717cb1c0feaf2d77d415c0
parentdaf13ac351a508b02d0b296c5858003ca13fe4eb (diff)
downloadhercules-65148fe27a9957558c924772164fb35e1174c2ea.tar.gz
hercules-65148fe27a9957558c924772164fb35e1174c2ea.tar.bz2
hercules-65148fe27a9957558c924772164fb35e1174c2ea.tar.xz
hercules-65148fe27a9957558c924772164fb35e1174c2ea.zip
* [Temperory Fixed]:
- Crashing of SQL char-server in parse_frommap case 0x2b01. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7236 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/char_sql/char.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 53a4381f1..478569d64 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,8 @@ 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/06/18
+ * [Temperory Fixed]:
+ - Crashing of SQL char-server in parse_frommap case 0x2b01. [Lance]
* [Removed]:
- Large part of scripted mob control commands are removed.
- Large part of scripted player control commands are removed.
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index aa84b1887..642a7214a 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -2550,6 +2550,7 @@ int parse_frommap(int fd) {
{
int aid = RFIFOL(fd,4), cid = RFIFOL(fd,8), size = RFIFOW(fd,2);
struct online_char_data* character;
+ struct mmo_charstatus char_data;
if (size - 13 != sizeof(struct mmo_charstatus))
{
ShowError("parse_from_map (save-char): Size mismatch! %d != %d\n", size-13, sizeof(struct mmo_charstatus));
@@ -2561,8 +2562,8 @@ int parse_frommap(int fd) {
(character = idb_get(online_char_db, aid)) != NULL &&
character->char_id == cid)
{
- memcpy(&char_dat[0], RFIFOP(fd,13), sizeof(struct mmo_charstatus));
- mmo_char_tosql(cid, char_dat);
+ memcpy(&char_data, RFIFOP(fd,13), sizeof(struct mmo_charstatus));
+ mmo_char_tosql(cid, &char_dat);
} else
ShowError("parse_from_map (save-char): Received data for non-existant/offline character (%d:%d)!\n", aid, cid);