msi: Sign extend the value when converting from a small integer.

This commit is contained in:
Hans Leidekker 2009-11-19 09:30:04 +01:00 committed by Alexandre Julliard
parent 8fcaa52d5d
commit 83e7a1214a
1 changed files with 2 additions and 2 deletions

View File

@ -1201,7 +1201,7 @@ static UINT msi_stream_name( const MSITABLEVIEW *tv, UINT row, LPWSTR *pstname )
switch( n ) switch( n )
{ {
case 2: case 2:
sprintfW( number, fmt, ival^0x8000 ); sprintfW( number, fmt, ival-0x8000 );
break; break;
case 4: case 4:
sprintfW( number, fmt, ival^0x80000000 ); sprintfW( number, fmt, ival^0x80000000 );
@ -2573,7 +2573,7 @@ static MSIRECORD *msi_get_transform_record( const MSITABLEVIEW *tv, const string
case 2: case 2:
val = read_raw_int(rawdata, ofs, n); val = read_raw_int(rawdata, ofs, n);
if (val) if (val)
MSI_RecordSetInteger( rec, i+1, val^0x8000 ); MSI_RecordSetInteger( rec, i+1, val-0x8000 );
TRACE(" field %d [0x%04x]\n", i+1, val ); TRACE(" field %d [0x%04x]\n", i+1, val );
break; break;
case 4: case 4: