Skip to content

Commit 8239106

Browse files
committed
Correction: ulong not long
1 parent d80903d commit 8239106

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Reactor/Networking/Extensions/ExtraMessageExtensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ public static void Write(this MessageWriter writer, Enum value)
5252
writer.Write(Convert.ToInt16(value));
5353
else if (underlyingType == typeof(ushort))
5454
writer.Write(Convert.ToUInt16(value));
55-
else if (underlyingType == typeof(long))
56-
writer.Write(Convert.ToInt64(value));
5755
else if (underlyingType == typeof(ulong))
5856
writer.Write(Convert.ToUInt64(value));
5957
else if (underlyingType == typeof(uint))
6058
writer.WritePacked(Convert.ToUInt32(value));
6159
else if (underlyingType == typeof(int))
6260
writer.WritePacked(Convert.ToInt32(value));
61+
else if (underlyingType == typeof(long))
62+
throw new NotSupportedException("long enum types are not supported at the moment.");
6363
else
6464
throw new ArgumentException("Unknown underlying type for " + enumType.Name);
6565
}

0 commit comments

Comments
 (0)