Signed-off-by: Andrey Gusev andrey.goosev@gmail.com --- dlls/msi/format.c | 2 +- dlls/msi/string.c | 2 +- dlls/msi/table.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/format.c b/dlls/msi/format.c index 9356c9e30d..2534b8f6a3 100644 --- a/dlls/msi/format.c +++ b/dlls/msi/format.c @@ -242,7 +242,7 @@ static WCHAR *deformat_file( FORMAT *format, FORMSTR *str, BOOL shortname, int * if ((ret = strdupW( file->TargetPath ))) len = strlenW( ret ); goto done; } - if ((len = GetShortPathNameW(file->TargetPath, NULL, 0)) <= 0) + if ((len = GetShortPathNameW(file->TargetPath, NULL, 0)) == 0) { if ((ret = strdupW( file->TargetPath ))) len = strlenW( ret ); goto done; diff --git a/dlls/msi/string.c b/dlls/msi/string.c index f094a53c9e..b0e61e5d76 100644 --- a/dlls/msi/string.c +++ b/dlls/msi/string.c @@ -246,7 +246,7 @@ static UINT string2id( const string_table *st, const char *buffer, UINT *id ) }
sz = MultiByteToWideChar( st->codepage, 0, buffer, -1, NULL, 0 ); - if( sz <= 0 ) + if( sz == 0 ) return r; str = msi_alloc( sz*sizeof(WCHAR) ); if( !str ) diff --git a/dlls/msi/table.c b/dlls/msi/table.c index 45a181445a..41e313736f 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -1279,7 +1279,7 @@ static UINT get_table_value_from_record( MSITABLEVIEW *tv, MSIRECORD *rec, UINT UINT r; int ival;
- if ( (iField <= 0) || + if ( (iField == 0) || (iField > tv->num_cols) || MSI_RecordIsNull( rec, iField ) ) return ERROR_FUNCTION_FAILED;