Преглед на файлове

- Corrected some signed/unsigned comparisons corrections which were incorrect.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6926 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex преди 19 години
родител
ревизия
e06f6f83cd
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 4 4
      src/map/status.c

+ 4 - 4
src/map/status.c

@@ -561,12 +561,12 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s
 		unit_skillcastcancel(target, 2);
 	}
 
-	if (hp >= (signed int)status->hp) {
+	if ((unsigned int)hp >= status->hp) {
 		if (flag&2) return 0;
 		hp = status->hp;
 	}
 
-	if (sp > (signed int)status->sp) {
+	if ((unsigned int)sp > status->sp) {
 		if (flag&2) return 0;
 		sp = status->sp;
 	}
@@ -678,7 +678,7 @@ int status_heal(struct block_list *bl,int hp,int sp, int flag)
 			hp = 0;
 
 		
-		if(hp > (signed int)(status->max_hp - status->hp))
+		if((unsigned int)hp > status->max_hp - status->hp)
 			hp = status->max_hp - status->hp;
 	}
 
@@ -688,7 +688,7 @@ int status_heal(struct block_list *bl,int hp,int sp, int flag)
 	}
 
 	if(sp) {
-		if(sp > (signed int)(status->max_sp - status->sp))
+		if((unsigned int)sp > status->max_sp - status->sp)
 			sp = status->max_sp - status->sp;
 	}