Commit 65d12c34 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

msi: Fix the value of LONG integers in records (suggested by James Hawkins).

parent e12f2b36
......@@ -1308,6 +1308,8 @@ static UINT msi_table_modify_row( MSITABLEVIEW *tv, MSIRECORD *rec,
val = MSI_RecordGetInteger( rec, i+1 );
if ( 2 == bytes_per_column( &tv->columns[i] ) )
val ^= 0x8000;
else
val ^= 0x80000000;
}
r = TABLE_set_int( &tv->view, row, i+1, val );
if( r )
......
......@@ -1026,12 +1026,20 @@ static void test_where(void)
r = do_query(hdb, query, &rec);
ok(r == ERROR_SUCCESS, "MsiViewFetch failed: %d\n", r);
ok( check_record( rec, 4, "zero.cab"), "wrong cabinet\n");
MsiCloseHandle( rec );
query = "SELECT * FROM `Media` WHERE `LastSequence` >= 1";
r = do_query(hdb, query, &rec);
ok(r == ERROR_SUCCESS, "MsiViewFetch failed: %d\n", r);
ok( check_record( rec, 4, "one.cab"), "wrong cabinet\n");
r = MsiRecordGetInteger(rec, 1);
ok( 2 == r, "field wrong\n");
r = MsiRecordGetInteger(rec, 2);
ok( 1 == r, "field wrong\n");
MsiCloseHandle( rec );
MsiCloseHandle( hdb );
DeleteFile(msifile);
}
......
......@@ -197,7 +197,7 @@ static UINT WHERE_evaluate( MSIDATABASE *db, MSIVIEW *table, UINT row,
case EXPR_COL_NUMBER32:
r = table->ops->fetch_int( table, row, cond->u.col_number, &tval );
*val = tval;
*val = tval - 0x80000000;
return r;
case EXPR_UVAL:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment