mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-18 23:57:32 +00:00
SCI: Fix warning about double being silently converted to int
svn-id: r45262
This commit is contained in:
parent
3a1495f247
commit
86b81c8eb6
@ -31,8 +31,8 @@ namespace Sci {
|
||||
reg_t kRandom(EngineState *s, int argc, reg_t *argv) {
|
||||
int fromNumber = argv[0].toUint16();
|
||||
int toNumber = argv[1].toUint16();
|
||||
int randomNumber = fromNumber + ((toNumber + 1.0 - fromNumber) * (rand() / (RAND_MAX + 1.0)));
|
||||
return make_reg(0, randomNumber);
|
||||
double randomNumber = fromNumber + ((toNumber + 1.0 - fromNumber) * (rand() / (RAND_MAX + 1.0)));
|
||||
return make_reg(0, (int)randomNumber);
|
||||
}
|
||||
|
||||
reg_t kAbs(EngineState *s, int argc, reg_t *argv) {
|
||||
|
Loading…
Reference in New Issue
Block a user