Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/avifil32/api.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/avifil32/api.c b/dlls/avifil32/api.c index 63a3530591..37fa94169a 100644 --- a/dlls/avifil32/api.c +++ b/dlls/avifil32/api.c @@ -1119,10 +1119,10 @@ HRESULT WINAPI AVIBuildFilterW(LPWSTR szFilter, LONG cbFilter, BOOL fSaving) HeapFree(GetProcessHeap(), 0, lp);
/* add "All files" "*.*" filter if enough space left */ - size = LoadStringW(AVIFILE_hModule, IDS_ALLFILES, - szAllFiles, (sizeof(szAllFiles) - sizeof(all_files))/sizeof(WCHAR)) + 1; + size = LoadStringW(AVIFILE_hModule, IDS_ALLFILES, szAllFiles, + ARRAY_SIZE(szAllFiles) - ARRAY_SIZE(all_files)) + 1; memcpy( szAllFiles + size, all_files, sizeof(all_files) ); - size += sizeof(all_files) / sizeof(WCHAR); + size += ARRAY_SIZE(all_files);
if (cbFilter > size) { memcpy(szFilter, szAllFiles, size * sizeof(szAllFiles[0])); @@ -2109,8 +2109,7 @@ HRESULT WINAPI EditStreamSetInfoA(PAVISTREAM pstream, LPAVISTREAMINFOA asi, return AVIERR_BADSIZE;
memcpy(&asiw, asi, sizeof(asiw) - sizeof(asiw.szName)); - MultiByteToWideChar(CP_ACP, 0, asi->szName, -1, - asiw.szName, sizeof(asiw.szName)/sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, asi->szName, -1, asiw.szName, ARRAY_SIZE(asiw.szName));
return EditStreamSetInfoW(pstream, &asiw, sizeof(asiw)); }