diff options
author | George Hazan <ghazan@miranda.im> | 2017-11-15 12:50:38 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-11-15 12:50:38 +0300 |
commit | f6f193f8d9ef286699be2c2282a9c448f7668842 (patch) | |
tree | eb5ca088d0ce320fc6f78a73c857e5899ab51bf0 /protocols/IcqOscarJ/src/utilities.cpp | |
parent | 854f47adb115f3d03d6a64543178e84877acb0b4 (diff) |
fixes #1031 (ICQ password must be of 14 chars most)
Diffstat (limited to 'protocols/IcqOscarJ/src/utilities.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/utilities.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp index af26203a66..9242e1e063 100644 --- a/protocols/IcqOscarJ/src/utilities.cpp +++ b/protocols/IcqOscarJ/src/utilities.cpp @@ -1461,7 +1461,8 @@ char* __fastcall ICQTranslateUtfStatic(const char *src, char *buf, size_t bufsiz return buf;
}
-char* CIcqProto::GetUserStoredPassword(char *szBuffer, size_t cbSize)
+template<size_t cbSize>
+char* CIcqProto::GetUserStoredPassword(char(&szBuffer)[cbSize])
{
if (!getSettingStringStatic(NULL, "Password", szBuffer, cbSize))
if (mir_strlen(szBuffer))
@@ -1476,7 +1477,7 @@ char* CIcqProto::GetUserPassword(BOOL bAlways) if (m_szPassword[0] != '\0' && (m_bRememberPwd || bAlways))
return m_szPassword;
- if (GetUserStoredPassword(m_szPassword, sizeof(m_szPassword))) {
+ if (GetUserStoredPassword(m_szPassword)) {
m_bRememberPwd = true;
return m_szPassword;
}
|