summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-05-30 10:25:24 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-05-30 10:25:24 +0000
commit7c862bb56c10a32edbf38e3843549678a71309c9 (patch)
treeac0b41e3c1a4fdb614a195c8121383930a60766a /src/mir_core
parent98a011711360f3a1ef0c68b667c2c05de5c1892e (diff)
fix for a nasty bug with bitmap filters
git-svn-id: http://svn.miranda-ng.org/main/trunk@16888 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/bitmaps.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/mir_core/src/bitmaps.cpp b/src/mir_core/src/bitmaps.cpp
index ad0fa71d2c..ee964c482c 100644
--- a/src/mir_core/src/bitmaps.cpp
+++ b/src/mir_core/src/bitmaps.cpp
@@ -42,13 +42,11 @@ MIR_CORE_DLL(void) Bitmap_GetFilter(TCHAR *dest, size_t destLen)
if (dest == NULL)
return;
- CMString filter;
- filter.AppendFormat(_T("%s (*.bmp;*.jpg;*.gif;*.png)%c*.BMP;*.RLE;*.JPG;*.JPEG;*.GIF;*.PNG%c"), TranslateT("All Files"), 0, 0);
- filter.AppendFormat(_T("%s (*.bmp;*.rle)%c*.BMP;*.RLE%c"), TranslateT("Windows bitmaps"), 0, 0);
- filter.AppendFormat(_T("%s (*.jpg;*.jpeg)%c*.JPG;*.JPEG%c"), TranslateT("JPEG bitmaps"), 0, 0);
- filter.AppendFormat(_T("%s (*.gif)%c*.GIF%c"), TranslateT("GIF bitmaps"), 0, 0);
- filter.AppendFormat(_T("%s (*.png)%c*.PNG%c"), TranslateT("PNG bitmaps"), 0, 0);
- filter.AppendChar(0);
-
- _tcsncpy_s(dest, destLen, filter, filter.GetLength());
+ mir_sntprintf(dest, destLen,
+ _T("%s (*.bmp;*.jpg;*.gif;*.png)%c*.BMP;*.RLE;*.JPG;*.JPEG;*.GIF;*.PNG%c")
+ _T("%s (*.bmp;*.rle)%c*.BMP;*.RLE%c")
+ _T("%s (*.jpg;*.jpeg)%c*.JPG;*.JPEG%c")
+ _T("%s (*.gif)%c*.GIF%c")
+ _T("%s (*.png)%c*.PNG%c%c"),
+ TranslateT("All Files"), 0, 0, TranslateT("Windows bitmaps"), 0, 0, TranslateT("JPEG bitmaps"), 0, 0, TranslateT("GIF bitmaps"), 0, 0, TranslateT("PNG bitmaps"), 0, 0, 0);
}