diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-12 14:11:09 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-12 14:11:09 +0000 |
commit | 993f52b27eb45e76a4699a748a3a317668323b23 (patch) | |
tree | ba9b6fcc5c6495bddc5836abde321bdb44d0fa79 /protocols/IcqOscarJ/src | |
parent | 4b1d52fd0b275bb419592eac0874d2fe46ad1979 (diff) |
ICQ: fix for the default values in user info structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@11841 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src')
-rw-r--r-- | protocols/IcqOscarJ/src/tlv.cpp | 4 | ||||
-rw-r--r-- | protocols/IcqOscarJ/src/utilities.cpp | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/protocols/IcqOscarJ/src/tlv.cpp b/protocols/IcqOscarJ/src/tlv.cpp index d928e01205..1f395c6e63 100644 --- a/protocols/IcqOscarJ/src/tlv.cpp +++ b/protocols/IcqOscarJ/src/tlv.cpp @@ -221,9 +221,9 @@ int oscar_tlv_chain::getNumber(WORD wType, WORD wIndex) if (tlv) {
if (tlv->wLen == 1)
return getByte(wType, wIndex);
- else if (tlv->wLen == 2)
+ if (tlv->wLen == 2)
return getWord(wType, wIndex);
- else if (tlv->wLen == 4)
+ if (tlv->wLen == 4)
return getDWord(wType, wIndex);
}
return 0;
diff --git a/protocols/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp index b452758539..3adf403033 100644 --- a/protocols/IcqOscarJ/src/utilities.cpp +++ b/protocols/IcqOscarJ/src/utilities.cpp @@ -1238,7 +1238,7 @@ void CIcqProto::writeDbInfoSettingTLVStringUtf(MCONTACT hContact, const char *sz void CIcqProto::writeDbInfoSettingTLVWord(MCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv)
{
int num = chain->getNumber(wTlv, 1);
- if (num > 0)
+ if (num > 0 && num != 0x7FFF)
setWord(hContact, szSetting, num);
else
delSetting(hContact, szSetting);
@@ -1248,8 +1248,7 @@ void CIcqProto::writeDbInfoSettingTLVWord(MCONTACT hContact, const char *szSetti void CIcqProto::writeDbInfoSettingTLVByte(MCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv)
{
int num = chain->getNumber(wTlv, 1);
-
- if (num > 0)
+ if (num > 0 && num != 0x7F)
setByte(hContact, szSetting, num);
else
delSetting(hContact, szSetting);
|