diff options
Diffstat (limited to 'tipper/subst.cpp')
-rw-r--r-- | tipper/subst.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tipper/subst.cpp b/tipper/subst.cpp index 683c87a..92f35ef 100644 --- a/tipper/subst.cpp +++ b/tipper/subst.cpp @@ -91,7 +91,12 @@ bool uid(HANDLE hContact, TCHAR *buff, int bufflen) { _ltot(ci.dVal, buff, 10);
break;
case CNFT_ASCIIZ:
- a2t((char *)ci.pszVal, buff, bufflen); // what's up with TCHAR in CONTACTINFO?!?!?
+ if(unicode_system) {
+ //w2t((char *)ci.pszVal, buff, bufflen); // what's up with TCHAR in CONTACTINFO?!?!?
+ w2t((wchar_t *)ci.pszVal, buff, bufflen);
+ } else {
+ a2t((char *)ci.pszVal, buff, bufflen);
+ }
break;
default:
return false;
@@ -142,9 +147,9 @@ TCHAR *GetStatusMessageText(HANDLE hContact) { TCHAR *ret = 0; DBVARIANT dbv; if(!DBGetContactSettingTString(hContact, MODULE, "TempStatusMsg", &dbv)) { - if(_tcslen(dbv.ptszVal)) { + if(dbv.ptszVal && dbv.ptszVal[0]) { ret = _tcsdup(dbv.ptszVal); - StripBBCodesInPlace(ret); // todo - fix for ansi build + StripBBCodesInPlace(ret); } else CallContactService(hContact, PSS_GETAWAYMSG, 0, 0); DBFreeVariant(&dbv);
/*
|