Alexandre Julliard : mlang: Return the correct count in IMLangFontLink_GetStrCodePages when aborting early .

Alexandre Julliard julliard at winehq.org
Fri May 15 07:47:01 CDT 2009


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu May 14 20:09:53 2009 +0200

mlang: Return the correct count  in IMLangFontLink_GetStrCodePages when aborting early.

---

 dlls/mlang/mlang.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/mlang/mlang.c b/dlls/mlang/mlang.c
index d627cfd..5deb87b 100644
--- a/dlls/mlang/mlang.c
+++ b/dlls/mlang/mlang.c
@@ -1939,7 +1939,7 @@ static HRESULT WINAPI fnIMLangFontLink_GetStrCodePages(
     }
 
     if (pdwCodePages) *pdwCodePages = cps;
-    if (pcchCodePages) *pcchCodePages = i;
+    if (pcchCodePages) *pcchCodePages = min( i + 1, cchSrc );
     return S_OK;
 }
 




More information about the wine-cvs mailing list