summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);