mirror of https://github.com/stella-emu/stella.git
Get rid of strlen_s and strnlen_s, don't drive audio if sound is disabled.
This commit is contained in:
parent
492596011a
commit
28f8dcc312
|
@ -59,6 +59,7 @@
|
|||
"iostream": "cpp",
|
||||
"cstdint": "cpp",
|
||||
"ostream": "cpp",
|
||||
"__memory": "cpp"
|
||||
"__memory": "cpp",
|
||||
"iosfwd": "cpp"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -256,7 +256,7 @@ ZipHandler::zip_error ZipHandler::zip_file_open(const char* filename, zip_file**
|
|||
goto error;
|
||||
}
|
||||
|
||||
strcpy_s(string, strlen(filename) + 1, filename);
|
||||
strncpy(string, filename, strlen(filename) + 1);
|
||||
newzip->filename = string;
|
||||
*zip = newzip;
|
||||
|
||||
|
|
|
@ -689,7 +689,7 @@ void PromptWidget::textPaste()
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PromptWidget::addToHistory(const char* str)
|
||||
{
|
||||
strncpy_s(_history[_historyIndex], str, kLineBufferSize - 1);
|
||||
strncpy(_history[_historyIndex], str, kLineBufferSize - 1);
|
||||
_historyIndex = (_historyIndex + 1) % kHistorySize;
|
||||
_historyLine = 0;
|
||||
|
||||
|
|
|
@ -1242,7 +1242,9 @@ void TIA::cycle(uInt32 colorClocks)
|
|||
if (++myHctr >= 228)
|
||||
nextLine();
|
||||
|
||||
myAudio.tick();
|
||||
#ifdef SOUND_SUPPORT
|
||||
myAudio.tick();
|
||||
#endif
|
||||
|
||||
++myTimestamp;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue