Random function fix

This commit is contained in:
CTurt 2014-11-01 13:35:22 +00:00
parent d97a43d8e8
commit 701232d410

View File

@ -98,7 +98,7 @@ inline u16 DSGM_GetAngle(s32 startx, s32 starty, s32 targetx, s32 targety) {
} }
inline int DSGM_Random(int min, int max) { inline int DSGM_Random(int min, int max) {
return (rand() % max) + min; return (rand() % (max - min)) + min;
} }
void DSGM_Delay(unsigned int time) { void DSGM_Delay(unsigned int time) {