mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 03:56:20 +00:00
Silenced some more cppcheck warnings.
svn-id: r47785
This commit is contained in:
parent
b0b7764178
commit
c5be030077
@ -73,6 +73,7 @@ void bringWordtoTop(char *str, int wordnum) {
|
||||
if (!str)
|
||||
return;
|
||||
strncpy(buf, str, MAXLINELEN);
|
||||
buf[MAXLINELEN - 1] = 0;
|
||||
char *word = strtok(buf, " ");
|
||||
if (!word) {
|
||||
debug("Invalid dictionary line");
|
||||
@ -415,6 +416,7 @@ bool AgiEngine::predictiveDialog() {
|
||||
_wordNumber = (_wordNumber + 1) % numMatchingWords;
|
||||
char tmp[MAXLINELEN];
|
||||
strncpy(tmp, _predictiveDictActLine, MAXLINELEN);
|
||||
tmp[MAXLINELEN - 1] = 0;
|
||||
char *tok = strtok(tmp, " ");
|
||||
for (uint8 i = 0; i <= _wordNumber; i++)
|
||||
tok = strtok(NULL, " ");
|
||||
@ -590,6 +592,7 @@ bool AgiEngine::matchWord() {
|
||||
_predictiveDictActLine = _predictiveDictLine[line];
|
||||
char tmp[MAXLINELEN];
|
||||
strncpy(tmp, _predictiveDictActLine, MAXLINELEN);
|
||||
tmp[MAXLINELEN - 1] = 0;
|
||||
char *tok = strtok(tmp, " ");
|
||||
tok = strtok(NULL, " ");
|
||||
_currentWord = String(tok, _currentCode.size());
|
||||
|
@ -180,6 +180,7 @@ static Common::String generateFilenameForDetection(const char *pattern, Filename
|
||||
error("generateFilenameForDetection: Unsupported genMethod");
|
||||
}
|
||||
|
||||
buf[sizeof(buf) - 1] = 0;
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user