From 77b2ff8df62f29c9b0d29a656f0d98d87cdf1ed7 Mon Sep 17 00:00:00 2001 From: Cydh Ramdh Date: Thu, 5 Dec 2013 11:16:40 +0700 Subject: [PATCH] * Fixed bugreport http://rathena.org/board/tracker/issue-8309-map-server-crash/ * Fixed bugreport http://rathena.org/board/tracker/issue-8307-error-in-map-server-in-latest-update/ Signed-off-by: Cydh Ramdh --- src/map/pc.c | 4 +++- src/map/status.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/map/pc.c b/src/map/pc.c index 6268b543dc..3dc084c06d 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -8485,7 +8485,8 @@ int pc_checkcombo(struct map_session_data *sd, struct item_data *data) { int index, idx, success = 0; for( i = 0; i < data->combos_count; i++ ) { - int *combo_idx = aMalloc(data->combos[i]->count); + int *combo_idx = NULL; + /* ensure this isn't a duplicate combo */ if( sd->combos.bonus != NULL ) { int x; @@ -8496,6 +8497,7 @@ int pc_checkcombo(struct map_session_data *sd, struct item_data *data) { continue; } + combo_idx = CREATE(combo_idx,int,data->combos[i]->count); for( j = 0; j < data->combos[i]->count; j++ ) { int id = data->combos[i]->nameid[j]; bool found = false; diff --git a/src/map/status.c b/src/map/status.c index 438e73e8ad..6d6cb65e2c 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -6988,7 +6988,7 @@ int status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_typ else if (sc->data[SC_SIEGFRIED]) sc_def += sc->data[SC_SIEGFRIED]->val3*100; // Status resistance. else if (sc->data[SC_SHIELDSPELL_REF] && sc->data[SC_SHIELDSPELL_REF]->val1 == 2) - sc_def += sc->data[SC_SIEGFRIED]->val3*100; + sc_def += sc->data[SC_SHIELDSPELL_REF]->val3*100; } // When tick def not set, reduction is the same for both.