Rob Shearman : avifil32: Fix the character count passed into LoadStringW in AVIBuildFilterW and AVISaveOptionsUpdate .

Alexandre Julliard julliard at winehq.org
Mon Feb 25 06:51:44 CST 2008


Module: wine
Branch: master
Commit: e7173dfa4e2424f7b522141a1645522ba9b7cd92
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e7173dfa4e2424f7b522141a1645522ba9b7cd92

Author: Rob Shearman <rob at codeweavers.com>
Date:   Mon Feb 25 09:01:39 2008 +0000

avifil32: Fix the character count passed into LoadStringW in AVIBuildFilterW and AVISaveOptionsUpdate.

---

 dlls/avifil32/api.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/avifil32/api.c b/dlls/avifil32/api.c
index 47947b5..b7b21b9 100644
--- a/dlls/avifil32/api.c
+++ b/dlls/avifil32/api.c
@@ -1148,7 +1148,7 @@ HRESULT WINAPI AVIBuildFilterW(LPWSTR szFilter, LONG cbFilter, BOOL fSaving)
 
   /* add "All files" "*.*" filter if enough space left */
   size = LoadStringW(AVIFILE_hModule, IDS_ALLFILES,
-		     szAllFiles, sizeof(szAllFiles)) + 1;
+		     szAllFiles, sizeof(szAllFiles)/sizeof(szAllFiles[0])) + 1;
   if (cbFilter > size) {
     int i;
 
@@ -1336,7 +1336,8 @@ static void AVISaveOptionsUpdate(HWND hWnd)
 	    }
 	  } else {
 	    LoadStringW(AVIFILE_hModule, IDS_UNCOMPRESSED,
-			icinfo.szDescription, sizeof(icinfo.szDescription));
+			icinfo.szDescription,
+			sizeof(icinfo.szDescription)/sizeof(icinfo.szDescription[0]));
 	    lstrcatW(szFormat, icinfo.szDescription);
 	  }
 	} else if (sInfo.fccType == streamtypeAUDIO) {




More information about the wine-cvs mailing list