From 7fb6cc1034f220d789b3889e069a01841f9efcae Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 22 Oct 2012 13:04:15 +0000 Subject: ISO code added to the country list git-svn-id: http://svn.miranda-ng.org/main/trunk@2042 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/database/dbutils.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/modules/database') diff --git a/src/modules/database/dbutils.cpp b/src/modules/database/dbutils.cpp index fe0ba20b34..4af6e71084 100644 --- a/src/modules/database/dbutils.cpp +++ b/src/modules/database/dbutils.cpp @@ -106,8 +106,7 @@ static INT_PTR DbEventGetText(WPARAM wParam, LPARAM lParam) char* str = (*descr == 0) ? filename : descr; switch (egt->datatype) { case DBVT_WCHAR: - return (INT_PTR)((dbei->flags & DBEF_UTF) ? - Utf8DecodeT(str) : mir_a2t(str)); + return (INT_PTR)((dbei->flags & DBEF_UTF) ? Utf8DecodeT(str) : mir_a2t(str)); case DBVT_ASCIIZ: return (INT_PTR)((dbei->flags & DBEF_UTF) ? Utf8Decode(mir_strdup(str), NULL) : mir_strdup(str)); } @@ -120,8 +119,7 @@ static INT_PTR DbEventGetText(WPARAM wParam, LPARAM lParam) return 0; egt->datatype &= ~DBVTF_DENYUNICODE; - if (egt->datatype == DBVT_WCHAR) - { + if (egt->datatype == DBVT_WCHAR) { WCHAR* msg = NULL; if (dbei->flags & DBEF_UTF) { char* str = (char*)alloca(dbei->cbBlob + 1); @@ -146,7 +144,8 @@ static INT_PTR DbEventGetText(WPARAM wParam, LPARAM lParam) else { msg = (WCHAR*)mir_alloc(sizeof(WCHAR) * msglen); MultiByteToWideChar(egt->codepage, 0, (char *) dbei->pBlob, -1, msg, (int)msglen); - } } + } + } return (INT_PTR)msg; } else if (egt->datatype == DBVT_ASCIIZ) { -- cgit v1.2.3