You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LuaValue.Read<EnumType>() should work for "number" types #198
(Try)Read fail for enum types since LuaValue doesn't know how to handle these even if the value is a number: luaValue.Read<ApplicationInstallMode>(); // fails
I added this block to LuaValue.TryRead in the LuaValueType.Number case to make this work as expected:
else if (t.IsEnum)
{
if (!MathEx.IsInteger(value)) break;
var v = (long)value;
result = Unsafe.As<long, T>(ref v);
return true;
}
Note: this just duplicates the if (t == typeof(long)) block. Could be merged into one.
Activity