From 34c207ff38e689dce820f8fb0c4b9fea7f4b9a84 Mon Sep 17 00:00:00 2001 From: upthorn Date: Sun, 23 Dec 2018 04:25:08 -0800 Subject: [PATCH] Fixed an infinite recursion in the implicit conversions of the working types --- BizHawk.Emulation.Common/WorkingTypes/wbyte.cs | 2 +- BizHawk.Emulation.Common/WorkingTypes/wsbyte.cs | 2 +- BizHawk.Emulation.Common/WorkingTypes/wshort.cs | 2 +- BizHawk.Emulation.Common/WorkingTypes/wushort.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BizHawk.Emulation.Common/WorkingTypes/wbyte.cs b/BizHawk.Emulation.Common/WorkingTypes/wbyte.cs index f09a152bd6..aeabe1ffd6 100644 --- a/BizHawk.Emulation.Common/WorkingTypes/wbyte.cs +++ b/BizHawk.Emulation.Common/WorkingTypes/wbyte.cs @@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Common.WorkingTypes public const Byte MinValue = Byte.MinValue; public static implicit operator wbyte(uint value) { - return value; + return new wbyte(value); } public static implicit operator byte(wbyte value) { diff --git a/BizHawk.Emulation.Common/WorkingTypes/wsbyte.cs b/BizHawk.Emulation.Common/WorkingTypes/wsbyte.cs index 859b0a563c..183f4af48e 100644 --- a/BizHawk.Emulation.Common/WorkingTypes/wsbyte.cs +++ b/BizHawk.Emulation.Common/WorkingTypes/wsbyte.cs @@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Common.WorkingTypes public const SByte MinValue = SByte.MinValue; public static implicit operator wsbyte(int value) { - return value; + return new wsbyte(value); } public static implicit operator SByte(wsbyte value) { diff --git a/BizHawk.Emulation.Common/WorkingTypes/wshort.cs b/BizHawk.Emulation.Common/WorkingTypes/wshort.cs index 04040691b9..7e0808471f 100644 --- a/BizHawk.Emulation.Common/WorkingTypes/wshort.cs +++ b/BizHawk.Emulation.Common/WorkingTypes/wshort.cs @@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Common.WorkingTypes public const Int16 MinValue = Int16.MinValue; public static implicit operator wshort(int value) { - return value; + return new wshort(value); } public static implicit operator Int16(wshort value) { diff --git a/BizHawk.Emulation.Common/WorkingTypes/wushort.cs b/BizHawk.Emulation.Common/WorkingTypes/wushort.cs index 3e5a84abe3..57851100b6 100644 --- a/BizHawk.Emulation.Common/WorkingTypes/wushort.cs +++ b/BizHawk.Emulation.Common/WorkingTypes/wushort.cs @@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Common.WorkingTypes public const UInt16 MinValue = UInt16.MinValue; public static implicit operator wushort(uint value) { - return value; + return new wushort(value); } public static implicit operator ushort(wushort value) {