summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-04 17:11:01 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-04 17:11:01 +0000
commit60de54af92abdda979ccce978a8c6c031f468f61 (patch)
tree7bbfc157dc607d67f3d0fdd4f1d484946918ceb8
parentf9eaf41366eabfa7f784e9d3eb0ed572b39f31c7 (diff)
downloadhercules-60de54af92abdda979ccce978a8c6c031f468f61.tar.gz
hercules-60de54af92abdda979ccce978a8c6c031f468f61.tar.bz2
hercules-60de54af92abdda979ccce978a8c6c031f468f61.tar.xz
hercules-60de54af92abdda979ccce978a8c6c031f468f61.zip
Fixed a typo in r12008 causing server crashes when sending the fake npc packet.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12012 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/clif.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 49492d8d7..46aa4494a 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1565,10 +1565,11 @@ void clif_sendfakenpc(struct map_session_data *sd, int npcid)
{
unsigned char *buf;
int fd = sd->fd;
- WFIFOHEAD(fd, packet_len(0x78));
sd->state.using_fake_npc = 1;
+
+ WFIFOHEAD(fd, packet_len(0x78));
buf = WFIFOP(fd,0);
- memset(WBUFP(fd,0), 0, packet_len(0x78));
+ memset(WBUFP(buf,0), 0, packet_len(0x78));
WBUFW(buf,0)=0x78;
#if PACKETVER >=9
WBUFB(buf,2) = 0; //Unknown bit
@@ -1580,6 +1581,7 @@ void clif_sendfakenpc(struct map_session_data *sd, int npcid)
WBUFB(buf,49)=5;
WBUFB(buf,50)=5;
WFIFOSET(fd, packet_len(0x78));
+
return;
}