diff options
author | Stephane Delcroix <stephane@delcroix.org> | 2016-12-12 10:57:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-12 10:57:01 +0100 |
commit | 22bdca32339838702920802e49465264fcccd48b (patch) | |
tree | d4379b92dd8f59ca18a47f6ea5a3276535150686 /Xamarin.Forms.Build.Tasks/NodeILExtensions.cs | |
parent | f0ea0fa4bf86c7b641d0ddc3c734a5b7971c90f7 (diff) | |
download | xamarin-forms-22bdca32339838702920802e49465264fcccd48b.tar.gz xamarin-forms-22bdca32339838702920802e49465264fcccd48b.tar.bz2 xamarin-forms-22bdca32339838702920802e49465264fcccd48b.zip |
[XamlC] fix loading ulongs, optimize bytecode for ulongs (#611)
Diffstat (limited to 'Xamarin.Forms.Build.Tasks/NodeILExtensions.cs')
-rw-r--r-- | Xamarin.Forms.Build.Tasks/NodeILExtensions.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Xamarin.Forms.Build.Tasks/NodeILExtensions.cs b/Xamarin.Forms.Build.Tasks/NodeILExtensions.cs index 0c9b9e6b..ec068797 100644 --- a/Xamarin.Forms.Build.Tasks/NodeILExtensions.cs +++ b/Xamarin.Forms.Build.Tasks/NodeILExtensions.cs @@ -128,11 +128,11 @@ namespace Xamarin.Forms.Build.Tasks else if (targetTypeRef.FullName == "System.Byte") yield return Instruction.Create(OpCodes.Ldc_I4, Byte.Parse(str, CultureInfo.InvariantCulture)); else if (targetTypeRef.FullName == "System.UInt16") - yield return Instruction.Create(OpCodes.Ldc_I4, UInt16.Parse(str, CultureInfo.InvariantCulture)); + yield return Instruction.Create(OpCodes.Ldc_I4, unchecked((int)UInt16.Parse(str, CultureInfo.InvariantCulture))); else if (targetTypeRef.FullName == "System.UInt32") yield return Instruction.Create(OpCodes.Ldc_I4, UInt32.Parse(str, CultureInfo.InvariantCulture)); else if (targetTypeRef.FullName == "System.UInt64") - yield return Instruction.Create(OpCodes.Ldc_I8, UInt64.Parse(str, CultureInfo.InvariantCulture)); + yield return Instruction.Create(OpCodes.Ldc_I8, unchecked((long)UInt64.Parse(str, CultureInfo.InvariantCulture))); else if (targetTypeRef.FullName == "System.Single") yield return Instruction.Create(OpCodes.Ldc_R4, Single.Parse(str, CultureInfo.InvariantCulture)); else if (targetTypeRef.FullName == "System.Double") |