From 7261ca90ef81303dd7f3b1681e1b7beffb09ec7c Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Fri, 10 Mar 2023 13:37:42 +0100 Subject: [PATCH] Always use luau numbers, not lua integers for translation layer --- packages/lib-roblox/src/datatypes/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/lib-roblox/src/datatypes/mod.rs b/packages/lib-roblox/src/datatypes/mod.rs index 16a1764..49b380c 100644 --- a/packages/lib-roblox/src/datatypes/mod.rs +++ b/packages/lib-roblox/src/datatypes/mod.rs @@ -156,8 +156,8 @@ impl<'lua> FromRbxVariantLua<'lua> for LuaValue<'lua> { match variant { // Primitives Rbx::Bool(b) => Ok(LuaValue::Boolean(*b)), - Rbx::Int64(i) => Ok(LuaValue::Integer(*i as i32)), - Rbx::Int32(i) => Ok(LuaValue::Integer(*i)), + Rbx::Int64(i) => Ok(LuaValue::Number(*i as f64)), + Rbx::Int32(i) => Ok(LuaValue::Number(*i as f64)), Rbx::Float64(n) => Ok(LuaValue::Number(*n)), Rbx::Float32(n) => Ok(LuaValue::Number(*n as f64)), Rbx::String(s) => Ok(LuaValue::String(