Fix: wrong type conversion

This commit is contained in:
Akeit0 2024-03-02 18:24:53 +09:00
parent a509a7ba83
commit da317bcaff

View File

@ -134,8 +134,8 @@ namespace Alchemy.Editor.Elements
control.value = (long)value;
control.RegisterValueChangedCallback(x =>
{
var newValue = (long)Math.Clamp(control.value, 0, long.MaxValue);
OnValueChanged?.Invoke(newValue);
var newValue = Math.Clamp(control.value, 0, long.MaxValue);
OnValueChanged?.Invoke((ulong)newValue);
control.value = newValue;
});