For consistency with other operations.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/msiquery.c | 2 +- dlls/msi/select.c | 2 +- dlls/msi/table.c | 4 ++-- dlls/msi/where.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/msi/msiquery.c b/dlls/msi/msiquery.c index db5660a647..30c4f655d3 100644 --- a/dlls/msi/msiquery.c +++ b/dlls/msi/msiquery.c @@ -696,7 +696,7 @@ UINT MSI_ViewModify( MSIQUERY *query, MSIMODIFY mode, MSIRECORD *rec ) if ( mode == MSIMODIFY_UPDATE && rec->cookie != (UINT64)(ULONG_PTR)query ) return ERROR_FUNCTION_FAILED;
- r = view->ops->modify( view, mode, rec, query->row ); + r = view->ops->modify( view, mode, rec, query->row - 1 ); if (mode == MSIMODIFY_DELETE && r == ERROR_SUCCESS) query->row--;
diff --git a/dlls/msi/select.c b/dlls/msi/select.c index 8bd4509c0e..e17cbbbdf2 100644 --- a/dlls/msi/select.c +++ b/dlls/msi/select.c @@ -253,7 +253,7 @@ static UINT msi_select_update(struct tagMSIVIEW *view, MSIRECORD *rec, UINT row) if (r != ERROR_SUCCESS) return r;
- r = sv->table->ops->get_row(sv->table, row - 1, &mod); + r = sv->table->ops->get_row(sv->table, row, &mod); if (r != ERROR_SUCCESS) return r;
diff --git a/dlls/msi/table.c b/dlls/msi/table.c index dfa4469bef..b507268eb7 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -1731,7 +1731,7 @@ static UINT msi_table_update(struct tagMSIVIEW *view, MSIRECORD *rec, UINT row) }
/* the row cannot be changed */ - if (row != new_row + 1) + if (row != new_row) return ERROR_FUNCTION_FAILED;
return TABLE_set_row(view, new_row, rec, (1 << tv->num_cols) - 1); @@ -1769,7 +1769,7 @@ static UINT msi_refresh_record( struct tagMSIVIEW *view, MSIRECORD *rec, UINT ro MSIRECORD *curr; UINT r, i, count;
- r = TABLE_get_row(view, row - 1, &curr); + r = TABLE_get_row(view, row, &curr); if (r != ERROR_SUCCESS) return r;
diff --git a/dlls/msi/where.c b/dlls/msi/where.c index 6c08471bbf..234ba5e008 100644 --- a/dlls/msi/where.c +++ b/dlls/msi/where.c @@ -944,8 +944,8 @@ static UINT WHERE_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode, { UINT *rows;
- if (find_row(wv, row - 1, &rows) == ERROR_SUCCESS) - row = rows[0] + 1; + if (find_row(wv, row, &rows) == ERROR_SUCCESS) + row = rows[0]; else row = -1;