Hi,

sorry, must have mixed something up, here's the correct patch.

Regards,
Tim

On 2016-01-04 08:16, Tim Kosse wrote:
> Hi,
> 
> the reverse function mbsrtowcs (mingw-w64-crt/misc/mbrtowc.c) suffers
> from the same problem. This second patch fixes this function as well.
> 
> Regards,
> Tim Kosse
diff --git a/mingw-w64-crt/misc/mbrtowc.c b/mingw-w64-crt/misc/mbrtowc.c
index 5cd106e..c3091cb 100644
--- a/mingw-w64-crt/misc/mbrtowc.c
+++ b/mingw-w64-crt/misc/mbrtowc.c
@@ -137,8 +137,7 @@ mbsrtowcs (wchar_t* __restrict__ dst,  const char ** __restrict__ src,
   else
     {
       wchar_t byte_bucket = 0;
-      while (n < len
-	     && (ret = __mbrtowc_cp (&byte_bucket, *src, mb_max,
+      while ((ret = __mbrtowc_cp (&byte_bucket, *src, mb_max,
 				     internal_ps, cp, mb_max))
 		  > 0)
 	{
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to