Added temporary bailout code, cppcheck crashes when string checking leaks out. This needs a better fix, this is just to
see the problem more easily.
This commit is contained in:
parent
f6d121443e
commit
50d9a085da
|
@ -610,7 +610,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
std::string Preprocessor::expandMacros(std::string code)
|
std::string Preprocessor::expandMacros(std::string code)
|
||||||
{
|
{
|
||||||
|
@ -668,6 +668,14 @@ std::string Preprocessor::expandMacros(std::string code)
|
||||||
if (code[pos1] == '\\')
|
if (code[pos1] == '\\')
|
||||||
++pos1;
|
++pos1;
|
||||||
++pos1;
|
++pos1;
|
||||||
|
|
||||||
|
if (!code[pos1])
|
||||||
|
{
|
||||||
|
// TODO, this code is here, because there is currently a bug in cppcheck
|
||||||
|
// Once it has been sorted out, this if can be removed
|
||||||
|
std::cout << "\n\n####### There is a bug in preprocessor.cpp that can cause crash, shutting down.\n\n" << std::endl;
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue