Module: wine Branch: master Commit: 11b25a65ac06460e38424121b18afd839aa54ffd URL: http://source.winehq.org/git/wine.git/?a=commit;h=11b25a65ac06460e38424121b1...
Author: Marcus Meissner marcus@jet.franken.de Date: Fri Feb 15 21:14:22 2008 +0100
msi: Fixed error reporting of add_streams_to_table.
---
dlls/msi/streams.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/msi/streams.c b/dlls/msi/streams.c index 9950270..3d91b9b 100644 --- a/dlls/msi/streams.c +++ b/dlls/msi/streams.c @@ -439,7 +439,7 @@ static const MSIVIEWOPS streams_ops = NULL, };
-static UINT add_streams_to_table(MSISTREAMSVIEW *sv) +static INT add_streams_to_table(MSISTREAMSVIEW *sv) { IEnumSTATSTG *stgenum = NULL; STATSTG stat; @@ -498,6 +498,7 @@ static UINT add_streams_to_table(MSISTREAMSVIEW *sv) UINT STREAMS_CreateView(MSIDATABASE *db, MSIVIEW **view) { MSISTREAMSVIEW *sv; + INT rows;
TRACE("(%p, %p)\n", db, view);
@@ -507,10 +508,10 @@ UINT STREAMS_CreateView(MSIDATABASE *db, MSIVIEW **view)
sv->view.ops = &streams_ops; sv->db = db; - sv->num_rows = add_streams_to_table(sv); - - if (sv->num_rows < 0) + rows = add_streams_to_table(sv); + if (rows < 0) return ERROR_FUNCTION_FAILED; + sv->num_rows = rows;
*view = (MSIVIEW *)sv;