diff options
Diffstat (limited to 'src/utility.h')
-rw-r--r-- | src/utility.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utility.h b/src/utility.h index 534aea483..497f79fa0 100644 --- a/src/utility.h +++ b/src/utility.h @@ -1741,6 +1741,11 @@ void mysrand(unsigned seed); inline int myrand_range(int min, int max) { + if(max-min > MYRAND_MAX) + { + dstream<<"WARNING: myrand_range: max-min > MYRAND_MAX"<<std::endl; + assert(0); + } if(min > max) { assert(0); |