From 0aa0d5ab6c5ef2206cd800d22652955b0c357096 Mon Sep 17 00:00:00 2001 From: "Stefanos A." Date: Fri, 25 Oct 2013 08:57:33 +0200 Subject: [PATCH] Check the existence of a Constant reference using the Constant.Reference property, instead of the first character of Constant.Value. Fixes values that are negative numbers. --- Source/Bind/Utilities.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Bind/Utilities.cs b/Source/Bind/Utilities.cs index 9ddedc56..89463c44 100644 --- a/Source/Bind/Utilities.cs +++ b/Source/Bind/Utilities.cs @@ -205,7 +205,7 @@ namespace Bind // Tried to add a constant that already exists. If one constant // is like: 'Foo = 0x5' and the other like: 'Foo = Bar.Foo', then // keep the first one. - if (!Char.IsDigit(((Constant)s.ConstantCollection[t.Name]).Value[0])) + if (!String.IsNullOrEmpty(s.ConstantCollection[t.Name].Reference)) { s.ConstantCollection.Remove(t.Name); s.ConstantCollection.Add(t.Name, t);