summaryrefslogtreecommitdiff
path: root/src/modules/database
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-22 13:04:15 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-22 13:04:15 +0000
commit7fb6cc1034f220d789b3889e069a01841f9efcae (patch)
treea9769b68251bced5552291dd5c4f551f1ad124e6 /src/modules/database
parenteacd84efa1666b3afc4c98e632fa3bb4289a43c2 (diff)
ISO code added to the country list
git-svn-id: http://svn.miranda-ng.org/main/trunk@2042 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/database')
-rw-r--r--src/modules/database/dbutils.cpp9
1 files changed, 4 insertions, 5 deletions
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) {