Bläddra i källkod

random Cpp fix

Simon Krajewski 13 år sedan
förälder
incheckning
887b4f70b7
1 ändrade filer med 1 tillägg och 0 borttagningar
  1. 1 0
      std/cpp/_std/Std.hx

+ 1 - 0
std/cpp/_std/Std.hx

@@ -45,6 +45,7 @@
 	}
 
 	public static function random( x : Int ) : Int {
+		if (x <= 0) return 0;
 		return untyped __global__.__hxcpp_irand(x);
 	}