Fix compile warning for strncpy in Visual Studio.

Hopefully this will make Thomas happy :)
This commit is contained in:
Stephen Anthony 2019-08-14 18:10:56 -02:30
parent 359244c66d
commit 0e341a2467
1 changed files with 4 additions and 0 deletions

View File

@ -689,7 +689,11 @@ void PromptWidget::textPaste()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void PromptWidget::addToHistory(const char* str)
{
#if defined(BSPF_WINDOWS)
strncpy_s(_history[_historyIndex], kLineBufferSize, str, kLineBufferSize - 1);
#else
strncpy(_history[_historyIndex], str, kLineBufferSize - 1);
#endif
_historyIndex = (_historyIndex + 1) % kHistorySize;
_historyLine = 0;