fix bug in ramwatch signed value printing, and probably unsigned 32bit value printing as well

This commit is contained in:
zeromus 2012-03-04 21:46:54 +00:00
parent a25699fb89
commit dec7183e73
1 changed files with 23 additions and 2 deletions

View File

@ -267,10 +267,31 @@ namespace BizHawk.MultiClient
return String.Format("{0:X8}", value);
}
case asigned.SIGNED:
return ((sbyte)value).ToString();
switch (type)
{
default:
case atype.BYTE:
return ((sbyte)value).ToString();
case atype.WORD:
return ((short)value).ToString();
case atype.DWORD:
return ((int)value).ToString();
}
break;
default:
case asigned.UNSIGNED:
return value.ToString();
switch (type)
{
default:
case atype.BYTE:
return ((byte)value).ToString();
case atype.WORD:
return ((ushort)value).ToString();
case atype.DWORD:
return ((uint)value).ToString();
}
break;
}
}
}