diff options
author | Littleboy | 2012-08-13 00:05:38 -0400 |
---|---|---|
committer | Littleboy | 2012-08-27 21:49:33 -0400 |
commit | cd5e750a7fdfa0c2ac7904d24b7d8e5a06eff99a (patch) | |
tree | 786405bc501813c293298832245c4a25f2df4004 /engines/lastexpress/debug.cpp | |
parent | 4b05031042387ad9118690a77e1681165296bdec (diff) | |
download | scummvm-rg350-cd5e750a7fdfa0c2ac7904d24b7d8e5a06eff99a.tar.gz scummvm-rg350-cd5e750a7fdfa0c2ac7904d24b7d8e5a06eff99a.tar.bz2 scummvm-rg350-cd5e750a7fdfa0c2ac7904d24b7d8e5a06eff99a.zip |
LASTEXPRESS: Fix analysis warnings
Diffstat (limited to 'engines/lastexpress/debug.cpp')
-rw-r--r-- | engines/lastexpress/debug.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp index f89ad8b80d..55fb469da3 100644 --- a/engines/lastexpress/debug.cpp +++ b/engines/lastexpress/debug.cpp @@ -139,6 +139,9 @@ void Debugger::copyCommand(int argc, const char **argv) { for (int i = 0; i < _numParams; i++) { _commandParams[i] = (char *)malloc(strlen(argv[i]) + 1); + if (_commandParams[i] == NULL) + error("[Debugger::copyCommand] Cannot allocate memory for command parameters"); + memset(_commandParams[i], 0, strlen(argv[i]) + 1); strcpy(_commandParams[i], argv[i]); } |