viewing paste Unknown #6822 | Diff

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
--- src/map/clif.c
+++ src/map/clif.c
@@ -1658,12 +1658,14 @@
    nullpo_retv(sd);
    fd = sd->fd;
 
-   WFIFOHEAD(fd,packet_len(0x91));
-   WFIFOW(fd,0) = 0x91;
-   mapindex_getmapname_ext(mapindex_id2name(map), (char*)WFIFOP(fd,2));
-   WFIFOW(fd,18) = x;
-   WFIFOW(fd,20) = y;
-   WFIFOSET(fd,packet_len(0x91));
+   if (fd) {
+       WFIFOHEAD(fd,packet_len(0x91));
+       WFIFOW(fd,0) = 0x91;
+       mapindex_getmapname_ext(mapindex_id2name(map), (char*)WFIFOP(fd,2));
+       WFIFOW(fd,18) = x;
+       WFIFOW(fd,20) = y;
+       WFIFOSET(fd,packet_len(0x91));
+   }
 }
 
 
@@ -11904,7 +11906,7 @@
 {
    short len = (short)RFIFOW(fd,2) - 85;
    const char* message = (char*)RFIFOP(fd,4);
-   bool flag = (bool)RFIFOB(fd,84);
+   int flag = (int)RFIFOB(fd,84);
    const uint8* data = (uint8*)RFIFOP(fd,85);
 
    if( !flag )
 
Viewed 849 times, submitted by Guest.