diff -r 2f3be13e1140 -r 9ca28cef559a hedgewars/uRandom.pas --- a/hedgewars/uRandom.pas Sat Apr 03 06:52:26 2010 +0000 +++ b/hedgewars/uRandom.pas Sat Apr 03 08:46:01 2010 +0000 @@ -36,7 +36,7 @@ implementation {$IFDEF DEBUGFILE} -uses uMisc; +uses uMisc, uConsole; {$ENDIF} var cirbuf: array[0..63] of Longword; n: byte; @@ -77,6 +77,12 @@ function GetRandom(m: LongWord): LongWord; begin +if m = 0 then + begin + WriteLnToConsole('Warning: GetRandom(0) not defined'); + GetRandom:= 0; + exit + end; GetNext; GetRandom:= GetNext mod m end;