mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-19 23:58:21 +00:00
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:
parent
b15066bd03
commit
0aa0d5ab6c
|
@ -205,7 +205,7 @@ namespace Bind
|
||||||
// Tried to add a constant that already exists. If one constant
|
// Tried to add a constant that already exists. If one constant
|
||||||
// is like: 'Foo = 0x5' and the other like: 'Foo = Bar.Foo', then
|
// is like: 'Foo = 0x5' and the other like: 'Foo = Bar.Foo', then
|
||||||
// keep the first one.
|
// 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.Remove(t.Name);
|
||||||
s.ConstantCollection.Add(t.Name, t);
|
s.ConstantCollection.Add(t.Name, t);
|
||||||
|
|
Loading…
Reference in a new issue