summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-02 03:04:42 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-02 03:04:42 +0000
commit36d63937539d16e61ef44968ebe0610956b69dfa (patch)
treebce071b2b4b7e1ee35c8902f4e87fb7698f032f5 /src
parent53b6e99c8d8e27bfb1d7d22ed32013005b4c7469 (diff)
downloadhercules-36d63937539d16e61ef44968ebe0610956b69dfa.tar.gz
hercules-36d63937539d16e61ef44968ebe0610956b69dfa.tar.bz2
hercules-36d63937539d16e61ef44968ebe0610956b69dfa.tar.xz
hercules-36d63937539d16e61ef44968ebe0610956b69dfa.zip
- Corrected some signed/unsigned comparisons corrections which were incorrect.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6926 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/status.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/status.c b/src/map/status.c
index da8492bdc..f5130d13e 100644
--- a/src/map/status.c
+++ b/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;
}