diff options
| author | Filippos Karapetis | 2010-10-15 15:05:23 +0000 | 
|---|---|---|
| committer | Filippos Karapetis | 2010-10-15 15:05:23 +0000 | 
| commit | c2e08538ee87e156720e6adc5da0bdb090df6a39 (patch) | |
| tree | 1a8054a94144ae7abae1b6f9ddb3bae1bc956979 /engines/m4/console.cpp | |
| parent | abcceb8a4eb96fd864cb38bec401974a44e33661 (diff) | |
| download | scummvm-rg350-c2e08538ee87e156720e6adc5da0bdb090df6a39.tar.gz scummvm-rg350-c2e08538ee87e156720e6adc5da0bdb090df6a39.tar.bz2 scummvm-rg350-c2e08538ee87e156720e6adc5da0bdb090df6a39.zip | |
M4: Fixed code analysis warnings - bug #3087845
svn-id: r53500
Diffstat (limited to 'engines/m4/console.cpp')
| -rw-r--r-- | engines/m4/console.cpp | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/engines/m4/console.cpp b/engines/m4/console.cpp index 71c70e3e1b..3e7f9624cf 100644 --- a/engines/m4/console.cpp +++ b/engines/m4/console.cpp @@ -61,8 +61,10 @@ static int strToInt(const char *s) {  		return atoi(s);  	// Hexadecimal string -	uint tmp; -	sscanf(s, "%xh", &tmp); +	uint tmp = 0; +	int read = sscanf(s, "%xh", &tmp); +	if (read < 1) +		error("strToInt failed on string \"%s\"", s);  	return (int)tmp;  } | 
