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.
This commit is contained in:
Stefanos A. 2013-10-25 08:57:33 +02:00
parent b15066bd03
commit 0aa0d5ab6c

View file

@ -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);