mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:45:50 +00:00
[WINESYNC] msi: Remove checks for negative value.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 5bd1b6f41032d1e133a8d9a96fba711ee491d634 by Andrey Gusev <andrey.goosev@gmail.com>
This commit is contained in:
parent
a237138534
commit
306890e8c4
3 changed files with 4 additions and 7 deletions
|
@ -242,7 +242,7 @@ static WCHAR *deformat_file( FORMAT *format, FORMSTR *str, BOOL shortname, int *
|
||||||
if ((ret = strdupW( file->TargetPath ))) len = strlenW( ret );
|
if ((ret = strdupW( file->TargetPath ))) len = strlenW( ret );
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if ((len = GetShortPathNameW(file->TargetPath, NULL, 0)) <= 0)
|
if (!(len = GetShortPathNameW(file->TargetPath, NULL, 0)))
|
||||||
{
|
{
|
||||||
if ((ret = strdupW( file->TargetPath ))) len = strlenW( ret );
|
if ((ret = strdupW( file->TargetPath ))) len = strlenW( ret );
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
@ -233,7 +233,7 @@ static void set_st_entry( string_table *st, UINT n, WCHAR *str, int len, USHORT
|
||||||
|
|
||||||
static UINT string2id( const string_table *st, const char *buffer, UINT *id )
|
static UINT string2id( const string_table *st, const char *buffer, UINT *id )
|
||||||
{
|
{
|
||||||
DWORD sz;
|
int sz;
|
||||||
UINT r = ERROR_INVALID_PARAMETER;
|
UINT r = ERROR_INVALID_PARAMETER;
|
||||||
LPWSTR str;
|
LPWSTR str;
|
||||||
|
|
||||||
|
@ -245,8 +245,7 @@ static UINT string2id( const string_table *st, const char *buffer, UINT *id )
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
sz = MultiByteToWideChar( st->codepage, 0, buffer, -1, NULL, 0 );
|
if (!(sz = MultiByteToWideChar( st->codepage, 0, buffer, -1, NULL, 0 )))
|
||||||
if( sz <= 0 )
|
|
||||||
return r;
|
return r;
|
||||||
str = msi_alloc( sz*sizeof(WCHAR) );
|
str = msi_alloc( sz*sizeof(WCHAR) );
|
||||||
if( !str )
|
if( !str )
|
||||||
|
|
|
@ -1279,9 +1279,7 @@ static UINT get_table_value_from_record( MSITABLEVIEW *tv, MSIRECORD *rec, UINT
|
||||||
UINT r;
|
UINT r;
|
||||||
int ival;
|
int ival;
|
||||||
|
|
||||||
if ( (iField <= 0) ||
|
if (!iField || iField > tv->num_cols || MSI_RecordIsNull( rec, iField ))
|
||||||
(iField > tv->num_cols) ||
|
|
||||||
MSI_RecordIsNull( rec, iField ) )
|
|
||||||
return ERROR_FUNCTION_FAILED;
|
return ERROR_FUNCTION_FAILED;
|
||||||
|
|
||||||
columninfo = tv->columns[ iField - 1 ];
|
columninfo = tv->columns[ iField - 1 ];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue