Issue information

Issue ID
#2920
Status
Invalid
Severity
None
Started
Hercules Elf Bot
Mar 29, 2009 16:48
Last Post
Hercules Elf Bot
Apr 18, 2012 15:43
Confirmation
N/A

Hercules Elf Bot - Mar 29, 2009 16:48

Originally posted by [b]Everade[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=2920

This possible crash persists since years, the code is still the same.
I know it's a crappy and just temporary fix, but since i'm using it, i had no crash since a few MONTHS.

status.c
QUOTE
nullpo_retr(0, bl);
switch (bl->type) {
case BL_PC:
return ((TBL_PC*)bl)->status.guild_id;
case BL_PET:
if (((TBL_PET*)bl)->msd)
if( !bl || !((TBL_PET*)bl)->msd)
return 0;

return ((TBL_PET*)bl)->msd->status.guild_id;
break;
case BL_MOB:
{


Don't forget to include windows.h
QUOTE
#include <windows.h>



As i said, it's really an emergency fix, but what else should someone do if a map crash wasn't fixed since years even after i've reported it allready with this fix.

This post has been edited by Everade: Mar 29 2009, 09:48 AM

Hercules Elf Bot - Dec 26, 2011 12:19

Originally posted by [b]Ind[/b]
this makes no sense, you are already doing a switch(bl->type), if bl wasn't provided it'd crash before that line. thus nullpo_ret(bl) is called at the heading