=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: msvcrt: Don' t increment variables both in the loop header and body (clang).
Alexandre Julliard
julliard at winehq.org
Mon Apr 9 15:41:09 CDT 2018
Module: wine
Branch: master
Commit: 807d47d44820261b0678e3aa419ea5d5008d5b51
URL: https://source.winehq.org/git/wine.git/?a=commit;h=807d47d44820261b0678e3aa419ea5d5008d5b51
Author: André Hentschel <nerv at dawncrow.de>
Date: Sat Mar 31 14:19:41 2018 +0200
msvcrt: Don't increment variables both in the loop header and body (clang).
Signed-off-by: André Hentschel <nerv at dawncrow.de>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvcrt/mbcs.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c
index 7ca1906..430c2a6 100644
--- a/dlls/msvcrt/mbcs.c
+++ b/dlls/msvcrt/mbcs.c
@@ -2011,13 +2011,12 @@ MSVCRT_size_t CDECL _mbsspn(const unsigned char* string, const unsigned char* se
{
if (_ismbblead(*p))
{
- for (q = set; *q; q++)
+ for (q = set; *q; q += 2)
{
if (!q[1])
break;
if ((*p == *q) && (p[1] == q[1]))
break;
- q++;
}
if (!q[0] || !q[1]) break;
}
@@ -2043,13 +2042,12 @@ unsigned char* CDECL _mbsspnp(const unsigned char* string, const unsigned char*
{
if (_ismbblead(*p))
{
- for (q = set; *q; q++)
+ for (q = set; *q; q += 2)
{
if (!q[1])
break;
if ((*p == *q) && (p[1] == q[1]))
break;
- q++;
}
if (!q[0] || !q[1]) break;
}
More information about the wine-cvs
mailing list