summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat/log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src/chat/log.cpp')
-rw-r--r--plugins/TabSRMM/src/chat/log.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp
index 551bacb1ca..6b02b68d5d 100644
--- a/plugins/TabSRMM/src/chat/log.cpp
+++ b/plugins/TabSRMM/src/chat/log.cpp
@@ -522,7 +522,7 @@ static int Log_AppendRTF(LOGSTREAMDATA* streamData, BOOL simpleMode, char **buff
char* d;
va_start(va, fmt);
- lineLen = _vsntprintf(line, 8000, fmt, va);
+ lineLen = mir_vsntprintf(line, 8000, fmt, va);
if (lineLen < 0) lineLen = 8000;
line[lineLen] = 0;
va_end(va);
@@ -621,7 +621,7 @@ static int Log_AppendRTF(LOGSTREAMDATA* streamData, BOOL simpleMode, char **buff
} else if (*line > 0 && *line < 128) {
*d++ = (char) * line;
}
- else d += sprintf(d, "\\u%u ?", (WORD) * line);
+ else d += mir_snprintf(d, strlen(d), "\\u%u ?", (WORD) * line);
}
*cbBufferEnd = (int)(d - *buffer);
@@ -1284,7 +1284,7 @@ void LoadMsgLogBitmaps(void)
for (i=0; i < SIZEOF(pLogIconBmpBits); i++) {
hIcon = hIcons[i];
pLogIconBmpBits[i] = (PBYTE) mir_alloc(RTFPICTHEADERMAXSIZE + (bih.biSize + widthBytes * bih.biHeight) * 2);
- rtfHeaderSize = sprintf((char *)pLogIconBmpBits[i], "{\\pict\\dibitmap0\\wbmbitspixel%u\\wbmplanes1\\wbmwidthbytes%u\\picw%u\\pich%u ", bih.biBitCount, widthBytes, bih.biWidth, bih.biHeight);
+ rtfHeaderSize = mir_snprintf((char *)pLogIconBmpBits[i], strlen((char *)pLogIconBmpBits[i]), "{\\pict\\dibitmap0\\wbmbitspixel%u\\wbmplanes1\\wbmwidthbytes%u\\picw%u\\pich%u ", bih.biBitCount, widthBytes, bih.biWidth, bih.biHeight);
hoBmp = (HBITMAP) SelectObject(hdcMem, hBmp);
FillRect(hdcMem, &rc, hBkgBrush);
DrawIconEx(hdcMem, 0, 1, hIcon, iIconSize, iIconSize, 0, NULL, DI_NORMAL);
@@ -1294,9 +1294,9 @@ void LoadMsgLogBitmaps(void)
{
int n;
for (n = 0; n < sizeof(BITMAPINFOHEADER); n++)
- sprintf((char *)pLogIconBmpBits[i] + rtfHeaderSize + n * 2, "%02X", ((PBYTE) & bih)[n]);
+ sprintf((char *)pLogIconBmpBits[i] + rtfHeaderSize + n * 2, "%02X", ((PBYTE) & bih)[n]); //!!!!!!!!!!!
for (n = 0; n < widthBytes * bih.biHeight; n += 4)
- sprintf((char *)pLogIconBmpBits[i] + rtfHeaderSize + (bih.biSize + n) * 2, "%02X%02X%02X%02X", pBmpBits[n], pBmpBits[n + 1], pBmpBits[n + 2], pBmpBits[n + 3]);
+ sprintf((char *)pLogIconBmpBits[i] + rtfHeaderSize + (bih.biSize + n) * 2, "%02X%02X%02X%02X", pBmpBits[n], pBmpBits[n + 1], pBmpBits[n + 2], pBmpBits[n + 3]); //!!!!!!!!!!!!!
}
logIconBmpSize[i] = rtfHeaderSize + (bih.biSize + widthBytes * bih.biHeight) * 2 + 1;
pLogIconBmpBits[i][logIconBmpSize[i] - 1] = '}';