Issue Information
-
#004582
-
5 - Critical
-
Fixed
Issue Confirmations
-
Yes (0)No (0)
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:
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
This post has been edited by xazax: Nov 28 2010, 05:54 AM
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;
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