diff options
-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);
|