Fix errors found by cppcheck
Merge pull request #106 from AMDmi3/cppcheck

Fix errors found by cppcheck on TGA loading