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

Issue Confirmations

  • Yes (0)No (0)
Photo

Crash via foods

Posted by Hercules Bot on 28 November 2010 - 01:52 PM

Originally posted by xazax
http://www.eathena.w...er&showbug=4582

Way to reproduce:

For example use int food, than use cash int food.

Explanation:
In status_change_start function see:

CODE
    case SC_INTFOOD:
        if (sc->data[SC_FOOD_INT_CASH] && sc->data[SC_FOOD_INT_CASH]->val1 > sc->data[type]->val1)
            return 0;


There sc->data[type] will be a nullpointer, since SC_INTFOOD hasn't started yet, so sc->data[type]->val1 will cause a crash.

Solution:

replace
CODE
sc->data[type]->val1
with
CODE
val1
in the corresponding places.

This post has been edited by xazax: Nov 28 2010, 05:54 AM