summaryrefslogtreecommitdiff
path: root/src/modules/chat
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/chat')
-rw-r--r--src/modules/chat/clist.cpp2
-rw-r--r--src/modules/chat/tools.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/chat/clist.cpp b/src/modules/chat/clist.cpp
index 3709b94610..a9e55d5fa6 100644
--- a/src/modules/chat/clist.cpp
+++ b/src/modules/chat/clist.cpp
@@ -60,7 +60,7 @@ MCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDi
return NULL;
CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)pszModule);
- if (pszGroup && lstrlen(pszGroup) > 0)
+ if (pszGroup[0])
db_set_ts(hContact, "CList", "Group", pszGroup);
else
db_unset(hContact, "CList", "Group");
diff --git a/src/modules/chat/tools.cpp b/src/modules/chat/tools.cpp
index c3cdf9889e..dd74d42f1a 100644
--- a/src/modules/chat/tools.cpp
+++ b/src/modules/chat/tools.cpp
@@ -38,7 +38,7 @@ TCHAR* RemoveFormatting(const TCHAR* pszWord)
int i = 0;
int j = 0;
- if (pszWord == 0 || lstrlen(pszWord) == 0)
+ if (pszWord == 0 || pszWord[0] == 0)
return NULL;
while (j < 9999 && i <= lstrlen(pszWord)) {
@@ -170,7 +170,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoNa
{
static TCHAR szBuf[4 * 1024];
- if (!fmt || lstrlen(fmt) == 0 || lstrlen(fmt) > 2000)
+ if (!fmt || fmt[0] == 0 || lstrlen(fmt) > 2000)
return 0;
va_list marker;