mirror of https://github.com/stella-emu/stella.git
Fix compile warning for strncpy in Visual Studio.
Hopefully this will make Thomas happy :)
This commit is contained in:
parent
359244c66d
commit
0e341a2467
|
@ -689,7 +689,11 @@ void PromptWidget::textPaste()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void PromptWidget::addToHistory(const char* str)
|
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);
|
strncpy(_history[_historyIndex], str, kLineBufferSize - 1);
|
||||||
|
#endif
|
||||||
_historyIndex = (_historyIndex + 1) % kHistorySize;
|
_historyIndex = (_historyIndex + 1) % kHistorySize;
|
||||||
_historyLine = 0;
|
_historyLine = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue