Browse Source

Follow up to 0fed97c to include a warning when skill_unit_layout/skill_nounit_layout has overflowed to prevent future issues.

aleos89 11 years ago
parent
commit
744eb0e532
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/map/skill.c

+ 5 - 0
src/map/skill.c

@@ -18827,6 +18827,8 @@ void skill_init_unit_layout (void) {
 		pos++;
 		pos++;
 	}
 	}
 
 
+	if( pos >= MAX_SKILL_UNIT_LAYOUT )
+		ShowError("skill_init_unit_layout: The skill_unit_layout has met the limit or overflowed (pos=%d)\n", pos);
 }
 }
 
 
 void skill_init_nounit_layout (void) {
 void skill_init_nounit_layout (void) {
@@ -18993,6 +18995,9 @@ void skill_init_nounit_layout (void) {
 		}
 		}
 		pos++;
 		pos++;
 	}
 	}
+
+	if( pos >= MAX_SKILL_UNIT_LAYOUT )
+		ShowError("skill_init_nounit_layout: The skill_nounit_layout has met the limit or overflowed (pos=%d)\n", pos);
 }
 }
 
 
 int skill_block_check(struct block_list *bl, sc_type type , uint16 skill_id) {
 int skill_block_check(struct block_list *bl, sc_type type , uint16 skill_id) {