Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #004947

  • 5 - Critical

  • Fixed

Issue Confirmations

  • Yes (0)No (0)
Photo

FriendsListAdd bug

Posted by Hercules Bot on 03 June 2011 - 03:39 PM

Originally posted by daniel_gp
http://www.eathena.w...er&showbug=4947

Well, since the last update to prevent the user to add himself as friend, there's a bug that crashes the map-server.
I've found it on GDB, after my server crashes twice.

I fixed it just checking if f_sd is null before comparing with sd, but i dunno if it's the right way, so...

clif.c

Before:
CODE
    if( sd->bl.id == f_sd->bl.id )
    {// adding oneself as friend
        return;
    }

    // Friend doesn't exist (no player with this name)
    if (f_sd == NULL) {
        clif_displaymessage(fd, msg_txt(3));
        return;
    }


After:
CODE
    // Friend doesn't exist (no player with this name)
    if (f_sd == NULL) {
        clif_displaymessage(fd, msg_txt(3));
        return;
    }

    if( sd->bl.id == f_sd->bl.id )
    {// adding oneself as friend
        return;
    }


This post has been edited by daniel_gp: Jun 3 2011, 08:41 AM