diff options
Diffstat (limited to 'plugins/Db3x_mmap/src')
-rw-r--r-- | plugins/Db3x_mmap/src/dbsettings.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/Db3x_mmap/src/dbsettings.cpp b/plugins/Db3x_mmap/src/dbsettings.cpp index a1e89cb4d4..c12a0e0d3e 100644 --- a/plugins/Db3x_mmap/src/dbsettings.cpp +++ b/plugins/Db3x_mmap/src/dbsettings.cpp @@ -349,10 +349,11 @@ STDMETHODIMP_(BOOL) CDb3Mmap::GetContactSettingStatic(MCONTACT contactID, LPCSTR if (bNeedsWchars) {
char *pBuf = NEWSTR_ALLOCA(dbv->pszVal);
- if (Utf8toUcs2(pBuf, dbv->cchVal, dbv->pwszVal, cbSaved) < 0)
+ int cbLen = Utf8toUcs2(pBuf, dbv->cchVal, dbv->pwszVal, cbSaved);
+ if (cbLen < 0)
return 1;
- dbv->pwszVal[cbSaved] = 0;
+ dbv->pwszVal[cbLen] = 0;
}
else if (dbv->type == DBVT_UTF8) {
mir_utf8decode(dbv->pszVal, NULL);
|