aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/console.cpp
diff options
context:
space:
mode:
authorColin Snover2017-01-05 21:05:22 -0600
committerColin Snover2017-02-05 12:38:21 -0600
commit10d97ce37947362e6fa7161cd85221f59ca49490 (patch)
tree096af451474abe5ab3f65e61016a0ff2d413608c /engines/sci/console.cpp
parentb1c3332fddbb16838f1a654d6fe35ddbe09bd051 (diff)
downloadscummvm-rg350-10d97ce37947362e6fa7161cd85221f59ca49490.tar.gz
scummvm-rg350-10d97ce37947362e6fa7161cd85221f59ca49490.tar.bz2
scummvm-rg350-10d97ce37947362e6fa7161cd85221f59ca49490.zip
SCI: Fix more unsafe C-string usage
Diffstat (limited to 'engines/sci/console.cpp')
-rw-r--r--engines/sci/console.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index f1bb8d3e7f..ae8ab14d84 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -1264,7 +1264,7 @@ bool Console::cmdMapInstrument(int argc, const char **argv) {
char *instrumentName = new char[11];
Common::strlcpy(instrumentName, argv[1], 11);
- for (uint16 i = 0; i < strlen(instrumentName); i++)
+ for (uint16 i = 0; i < Common::strnlen(instrumentName, 11); i++)
if (instrumentName[i] == '_')
instrumentName[i] = ' ';