summaryrefslogtreecommitdiff
path: root/src/common/random.h
diff options
context:
space:
mode:
authorgepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-19 16:27:41 +0000
committergepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-19 16:27:41 +0000
commit6fc8fc296c58e7a935fc6ee1d2775d02367edd95 (patch)
tree26b96b1ebbde9276b7b6d200377eb7b9a84ae61a /src/common/random.h
parentc017009bbffa6a89ce55bb28387f00164538bfbc (diff)
downloadhercules-6fc8fc296c58e7a935fc6ee1d2775d02367edd95.tar.gz
hercules-6fc8fc296c58e7a935fc6ee1d2775d02367edd95.tar.bz2
hercules-6fc8fc296c58e7a935fc6ee1d2775d02367edd95.tar.xz
hercules-6fc8fc296c58e7a935fc6ee1d2775d02367edd95.zip
Changed `rnd()` to return signed number to avoid possible negative-signed to unsigned comparisons (caused by r15483, bugreport:5254).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15498 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/random.h')
-rw-r--r--src/common/random.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/random.h b/src/common/random.h
index 59b609464..43dfd36c0 100644
--- a/src/common/random.h
+++ b/src/common/random.h
@@ -9,7 +9,7 @@
void rnd_init(void);
void rnd_seed(uint32);
-uint32 rnd(void);// [0, UINT32_MAX]
+int32 rnd(void);// [0, SINT32_MAX]
uint32 rnd_roll(uint32 dice_faces);// [0, dice_faces)
int32 rnd_value(int32 min, int32 max);// [min, max]
double rnd_uniform(void);// [0.0, 1.0)