Fix overflow in os.epoch

Closes #611
This commit is contained in:
Jonathan Coates 2020-12-23 12:33:47 +00:00
parent 663859d2e5
commit abf425dfb5
1 changed files with 1 additions and 1 deletions

View File

@ -412,7 +412,7 @@ public final long epoch( Optional<String> args ) throws LuaException
// Get in-game epoch
synchronized( m_alarms )
{
return m_day * 86400000 + (int) (m_time * 3600000.0f);
return m_day * 86400000L + (long) (m_time * 3600000.0);
}
default:
throw new LuaException( "Unsupported operation" );