projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
rnd-20030503-1-src
[rocksndiamonds.git]
/
src
/
libgame
/
misc.c
diff --git
a/src/libgame/misc.c
b/src/libgame/misc.c
index 10656e46a208fdcc0cf746b226c3345374eece9f..60aff1cca96ed5772fbe1475ddb86091a56c853e 100644
(file)
--- a/
src/libgame/misc.c
+++ b/
src/libgame/misc.c
@@
-324,7
+324,7
@@
unsigned int init_random_number(int nr, long seed)
unsigned int get_random_number(int nr, unsigned int max)
{
- return (
random_linux_libc(nr) % max
);
+ return (
max > 0 ? random_linux_libc(nr) % max : 0
);
}