Fix endptr output value in android_wcstoxxx()

These functions incorrectly multiplied an increment of wchar_t pointer
by sizeof(wchar_t), which made the result quite wrong, so just don't do
this.

See 744ea8a618 (For Android (wxQT), add private wcstol, wcstoul and
wcstod, 2015-02-11).
This commit is contained in:
Vadim Zeitlin
2021-01-27 18:29:57 +01:00
parent a3b655fd60
commit bb0f2f9768

View File

@@ -1256,7 +1256,7 @@ int wxVsscanf(const wxCStrData& str, const wchar_t *format, va_list ap)
#define ANDROID_WCSTO_END \
if(endptr) { \
if(dstendp) \
*endptr = (wchar_t*)(nptr + (dstendp - dst) * sizeof(wchar_t)); \
*endptr = (wchar_t*)(nptr + (dstendp - dst)); \
else \
*endptr = NULL; \
} \