Skip to content

Commit 7e83b74

Browse files
authored
Fixed boxed integer casts
1 parent 126562a commit 7e83b74

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

MLAPI-Editor/NetworkedBehaviourEditor.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,19 @@ void RenderNetworkedVarValueType<T>(int index) where T : struct
8383
if (type == typeof(int))
8484
val = EditorGUILayout.IntField(name, (int)val);
8585
else if (type == typeof(uint))
86-
val = EditorGUILayout.LongField(name, (long)val);
86+
val = EditorGUILayout.LongField(name, (long)((uint)val));
8787
else if (type == typeof(short))
88-
val = EditorGUILayout.IntField(name, (int)val);
88+
val = EditorGUILayout.IntField(name, (int)((short)val));
8989
else if (type == typeof(ushort))
90-
val = EditorGUILayout.IntField(name, (int)val);
90+
val = EditorGUILayout.IntField(name, (int)((ushort)val));
9191
else if (type == typeof(sbyte))
92-
val = EditorGUILayout.IntField(name, (int)val);
92+
val = EditorGUILayout.IntField(name, (int)((sbyte)val));
9393
else if (type == typeof(byte))
94-
val = EditorGUILayout.IntField(name, (int)val);
94+
val = EditorGUILayout.IntField(name, (int)((byte)val));
9595
else if (type == typeof(long))
9696
val = EditorGUILayout.LongField(name, (long)val);
9797
else if (type == typeof(ulong))
98-
val = EditorGUILayout.LongField(name, (long)val);
98+
val = EditorGUILayout.LongField(name, (long)((ulong)val));
9999
else if (type == typeof(bool))
100100
val = EditorGUILayout.Toggle(name, (bool)val);
101101
else if (type == typeof(string))

0 commit comments

Comments
 (0)