From cb8ee7adaff7d7ed25aeb03ce9bccdc1aa2c985f Mon Sep 17 00:00:00 2001 From: Nick Drochak Date: Tue, 15 Oct 2002 15:52:44 +0000 Subject: [PATCH] 2002-10-16 Nick Drochak * Enum.cs (Parse): Then fix the code so that it works too. svn path=/trunk/mcs/; revision=8295 --- mcs/class/corlib/System/ChangeLog | 4 ++++ mcs/class/corlib/System/Enum.cs | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mcs/class/corlib/System/ChangeLog b/mcs/class/corlib/System/ChangeLog index 80f196240b4..dbd7b7b088f 100644 --- a/mcs/class/corlib/System/ChangeLog +++ b/mcs/class/corlib/System/ChangeLog @@ -1,3 +1,7 @@ +2002-10-16 Nick Drochak + + * Enum.cs (Parse): Then fix the code so that it works too. + 2002-10-15 Nick Drochak * Enum.cs (Parse): Use unsigned casts to avoid compiler warnings. diff --git a/mcs/class/corlib/System/Enum.cs b/mcs/class/corlib/System/Enum.cs index 38e6cf67af3..33d70eb22ca 100644 --- a/mcs/class/corlib/System/Enum.cs +++ b/mcs/class/corlib/System/Enum.cs @@ -253,17 +253,17 @@ namespace System { case TypeCode.SByte: // use the unsigned version in the cast to avoid // compiler warning - retVal |= (long)((byte)info.values.GetValue (i)); + retVal |= (long)((byte)(SByte)info.values.GetValue (i)); break; case TypeCode.Int16: // use the unsigned version in the cast to avoid // compiler warning - retVal |= (long)((ushort)info.values.GetValue (i)); + retVal |= (long)((ushort)(short)info.values.GetValue (i)); break; case TypeCode.Int32: // use the unsigned version in the cast to avoid // compiler warning - retVal |= (long)((uint)info.values.GetValue (i)); + retVal |= (long)((uint)(int)info.values.GetValue (i)); break; case TypeCode.Int64: retVal |= (long)info.values.GetValue (i); -- 2.25.1