diff --git a/PC/winreg.c b/PC/winreg.c index e3801b257b0..96dd4ef059b 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -520,7 +520,7 @@ fixupMultiSZ(wchar_t **str, wchar_t *data, int len) Q = data + len; for (P = data, i = 0; P < Q && *P != '\0'; P++, i++) { str[i] = P; - for(; *P != '\0'; P++) + for (; P < Q && *P != '\0'; P++) ; } }