Fixed #5317 (failed to load std.cfg)

This commit is contained in:
Daniel Marjamäki 2014-01-07 20:47:04 +01:00
parent cf2608439f
commit e8b2d772e7
1 changed files with 9 additions and 0 deletions

View File

@ -94,6 +94,10 @@ void CheckOther::checkZeroDivision()
#include "cppcheckexecutor.h"
#ifdef _WIN32
#include <windows.h>
#endif
/**
* Main function of cppcheck
*
@ -104,6 +108,11 @@ void CheckOther::checkZeroDivision()
int main(int argc, char* argv[])
{
CppCheckExecutor exec;
#ifdef _WIN32
char exename[1024] = {0};
GetModuleFileNameA(NULL, exename, sizeof(exename)/sizeof(exename[0])-1);
argv[0] = exename;
#endif
return exec.check(argc, argv);
}