winhlp32: Don't use strncpy.

This commit is contained in:
Alexandre Julliard 2012-01-23 12:13:03 +01:00
parent 584bdb1883
commit c0f65cc99b
1 changed files with 1 additions and 2 deletions

View File

@ -1182,8 +1182,7 @@ static LRESULT CALLBACK WINHELP_HistoryWndProc(HWND hWnd, UINT msg, WPARAM wPara
if (len > sizeof(buffer)) len = sizeof(buffer); if (len > sizeof(buffer)) len = sizeof(buffer);
memcpy(buffer, ptr1, len); memcpy(buffer, ptr1, len);
if (len < sizeof(buffer)) buffer[len++] = ':'; if (len < sizeof(buffer)) buffer[len++] = ':';
strncpy(&buffer[len], Globals.history.set[i].page->lpszTitle, sizeof(buffer) - len); lstrcpynA(&buffer[len], Globals.history.set[i].page->lpszTitle, sizeof(buffer) - len);
buffer[sizeof(buffer) - 1] = '\0';
TextOutA(hDc, 0, i * tm.tmHeight, buffer, strlen(buffer)); TextOutA(hDc, 0, i * tm.tmHeight, buffer, strlen(buffer));
} }
} }