Issue information

Issue ID
#4582
Status
Fixed
Severity
Critical
Started
Hercules Elf Bot
Nov 28, 2010 13:52
Last Post
Hercules Elf Bot
Nov 28, 2010 13:52
Confirmation
N/A

Hercules Elf Bot - Nov 28, 2010 13:52

Originally posted by [b]xazax[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&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