diff options
author | Haruna <haru@dotalux.com> | 2015-01-01 18:06:10 +0100 |
---|---|---|
committer | Haruna <haru@dotalux.com> | 2015-01-01 18:06:10 +0100 |
commit | ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db (patch) | |
tree | e121e6c1e25ff47a26090437c937b022d2bfebc6 /src/map/clif.c | |
parent | dc6b470e4aaf252cb4f960b8b5585e51da821893 (diff) | |
parent | f70d54001cd1b975db6f4668a6d54dbae7a8ac92 (diff) | |
download | hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.tar.gz hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.tar.bz2 hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.tar.xz hercules-ff607f15ec14783aed8c0cf2749ac8cbe6d0e7db.zip |
Merge pull request #425 from 4144/fixes
Different fixes after automatic checks
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index d7b10f2f4..9309ad7b3 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -4749,6 +4749,7 @@ int clif_outsight(struct block_list *bl,va_list ap) TBL_PC *sd, *tsd; tbl=va_arg(ap,struct block_list*); if(bl == tbl) return 0; + // bl can be null pointer? and after if BL_PC, sd will be null pointer too sd = BL_CAST(BL_PC, bl); tsd = BL_CAST(BL_PC, tbl); @@ -14495,8 +14496,8 @@ void clif_ranking_pk(struct map_session_data* sd) { WFIFOHEAD(fd,packet_len(0x238)); WFIFOW(fd,0) = 0x238; - for(i=0;i<10;i++){ - memcpy(WFIFOP(fd,i*24+2), "Unknown", NAME_LENGTH); + for (i = 0; i < 10;i ++) { + strncpy((char*)WFIFOP(fd, i * 24 + 2), "Unknown", NAME_LENGTH); WFIFOL(fd,i*4+242) = 0; } WFIFOSET(fd, packet_len(0x238)); |