decoder/gme: fix rounding error

Cast to integer after multiplying with 1000.  Allows sub-second
seeking.
This commit is contained in:
Max Kellermann 2013-04-08 23:45:21 +02:00
parent 8e31366431
commit f84e288ad7
1 changed files with 1 additions and 1 deletions

View File

@ -189,7 +189,7 @@ gme_file_decode(struct decoder *decoder, const char *path_fs)
cmd = decoder_data(decoder, nullptr, buf, sizeof(buf), 0);
if (cmd == DECODE_COMMAND_SEEK) {
float where = decoder_seek_where(decoder);
gme_err = gme_seek(emu, (int)where * 1000);
gme_err = gme_seek(emu, int(where * 1000));
if (gme_err != nullptr)
g_warning("%s", gme_err);
decoder_command_finished(decoder);