Browse Source

* 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 <house.bad@gmail.com>

Cydh Ramdh 11 years ago
parent
commit
77b2ff8df6
2 changed files with 4 additions and 2 deletions
  1. 3 1
      src/map/pc.c
  2. 1 1
      src/map/status.c

+ 3 - 1
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;

+ 1 - 1
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.