summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-20 20:39:56 +0000
committertoms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-20 20:39:56 +0000
commit662e132e55d4483ab2bb84087b8f7d9908bf504b (patch)
tree94325ab6f0e144074ca0cadcb725c5f7ad3bcd10
parent4a440b794f190b5feed86f7c21fd02133164b1f6 (diff)
downloadhercules-662e132e55d4483ab2bb84087b8f7d9908bf504b.tar.gz
hercules-662e132e55d4483ab2bb84087b8f7d9908bf504b.tar.bz2
hercules-662e132e55d4483ab2bb84087b8f7d9908bf504b.tar.xz
hercules-662e132e55d4483ab2bb84087b8f7d9908bf504b.zip
Fixed a warning when using cap_value(x, 0, x) on an unsigned value
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8388 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/map.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 7a109ab32..7f108f2c5 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,7 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/08/20
+ * Fixed a warning when using cap_value(x, 0, x) on an unsigned value [Toms]
* Added clif_skill_fail for homunc to skill_castend_id & skill_castend_pos [Toms]
* Fixed homunc skill 8016 not considered as homunc skill [Toms]
* @useskill will now cause your homun to use the skill instead of you if
diff --git a/src/map/map.h b/src/map/map.h
index e1bcf2169..a23133150 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -163,7 +163,7 @@ enum {
#define map_flag_gvg(m) (map[m].flag.gvg || (agit_flag && map[m].flag.gvg_castle))
//Caps values to min/max
-#define cap_value(a, min, max) (a>max?max:a<min?min:a)
+#define cap_value(a, min, max) (a>=max?max:a<=min?min:a)
//This stackable implementation does not means a BL can be more than one type at a time, but it's
//meant to make it easier to check for multiple types at a time on invocations such as