We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d819260 commit 0c2bfafCopy full SHA for 0c2bfaf
Phantasma.VM/VMObject.cs
@@ -1314,8 +1314,18 @@ public void SerializeData(BinaryWriter writer)
1314
}
1315
1316
case VMType.Enum:
1317
- var temp1 = (Enum)this.Data;
1318
- var temp2 = uint.Parse(temp1.ToString("d"));
+ uint temp2;
+
1319
+ if (this.Data is Enum)
1320
+ {
1321
+ var temp1 = (Enum)this.Data;
1322
+ temp2 = uint.Parse(temp1.ToString("d"));
1323
+ }
1324
+ else
1325
1326
+ temp2 = (uint)this.Data;
1327
1328
1329
writer.WriteVarInt(temp2);
1330
break;
1331
0 commit comments