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

This commit is contained in:
Mike McCormack 2006-07-27 12:34:20 +09:00 committed by Alexandre Julliard
parent e12f2b36a3
commit 65d12c342d
3 changed files with 11 additions and 1 deletions

View File

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

View File

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

View File

@ -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: