summaryrefslogtreecommitdiff
path: root/src
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 /src
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
Diffstat (limited to 'src')
-rw-r--r--src/char_sql/char.c5
1 files changed, 3 insertions, 2 deletions
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);