Minor optimizations

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7286 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2021-07-27 18:56:42 +00:00
parent a24b5d6f62
commit 50ef1d3369
3 changed files with 9 additions and 7 deletions

View file

@ -196,9 +196,9 @@ TCHAR *CharPrev(const TCHAR *s, const TCHAR *p) {
}
char *CharNextA(const char *s) {
int l = 0;
int l = 0, mbl;
if (s && *s)
l = max(1, mblen(s, MB_CUR_MAX));
mbl = mblen(s, MB_CUR_MAX), l = max(1, mbl);
return const_cast<char*>(s + l);
}