summaryrefslogtreecommitdiff
path: root/plugins/ListeningTo
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-09 00:59:27 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-09 00:59:27 +0000
commit36472b00443e23acf28b0dd26ddc2c2e6216d909 (patch)
treea526bbc6d309e05f1728b772620c9272f9ab8c4a /plugins/ListeningTo
parent163ce5127e5c8244bccbdae72107ad101f70575f (diff)
code cleanup over mir_sntprintf + small bug fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@11295 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ListeningTo')
-rw-r--r--plugins/ListeningTo/src/players/generic.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/ListeningTo/src/players/generic.cpp b/plugins/ListeningTo/src/players/generic.cpp
index ca44c71f9c..ca9565b75f 100644
--- a/plugins/ListeningTo/src/players/generic.cpp
+++ b/plugins/ListeningTo/src/players/generic.cpp
@@ -32,12 +32,11 @@ int m_log(const TCHAR *function, const TCHAR *fmt, ...)
TCHAR text[1024];
size_t len;
- mir_sntprintf(text, MAX_REGS(text) - 10, _T("[%08u - %08u] [%s] "),
+ len = mir_sntprintf(text, SIZEOF(text), _T("[%08u - %08u] [%s] "),
GetCurrentThreadId(), GetTickCount(), function);
- len = mir_tstrlen(text);
va_start(va, fmt);
- mir_vsntprintf(&text[len], MAX_REGS(text) - len, fmt, va);
+ mir_vsntprintf(&text[len], SIZEOF(text) - len, fmt, va);
va_end(va);
BOOL writeBOM = (GetFileAttributes(_T("c:\\miranda_listeningto.log.txt")) == INVALID_FILE_ATTRIBUTES);