#6132 crash: daca: kvirc CheckOther::checkRedundantAssignment()
This commit is contained in:
parent
8a15486370
commit
29b46cb505
|
@ -594,7 +594,7 @@ void CheckOther::checkRedundantAssignment()
|
||||||
std::set<unsigned int> initialized;
|
std::set<unsigned int> initialized;
|
||||||
const Token* writtenArgumentsEnd = 0;
|
const Token* writtenArgumentsEnd = 0;
|
||||||
|
|
||||||
for (const Token* tok = scope->classStart->next(); tok != scope->classEnd; tok = tok->next()) {
|
for (const Token* tok = scope->classStart->next(); tok && tok != scope->classEnd; tok = tok->next()) {
|
||||||
if (tok == writtenArgumentsEnd)
|
if (tok == writtenArgumentsEnd)
|
||||||
writtenArgumentsEnd = 0;
|
writtenArgumentsEnd = 0;
|
||||||
|
|
||||||
|
|
|
@ -1945,6 +1945,17 @@ private:
|
||||||
" s->dyn_ltree[0].fc.freq++;\n"
|
" s->dyn_ltree[0].fc.freq++;\n"
|
||||||
"}\n", 0, false, false, false, false);
|
"}\n", 0, false, false, false, false);
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
|
// Ticket #6132 "crash: daca: kvirc CheckOther::checkRedundantAssignment()"
|
||||||
|
check("void HttpFileTransfer :: transferTerminated ( bool bSuccess@1 ) {\n"
|
||||||
|
"if ( m_szCompletionCallback . isNull ( ) ) {\n"
|
||||||
|
"KVS_TRIGGER_EVENT ( KviEvent_OnHTTPGetTerminated , out ? out : ( g_pApp . activeConsole ( ) ) , & vParams )\n"
|
||||||
|
"} else {\n"
|
||||||
|
"KviKvsScript :: run ( m_szCompletionCallback , out ? out : ( g_pApp . activeConsole ( ) ) , & vParams ) ;\n"
|
||||||
|
"}\n"
|
||||||
|
"}\n", 0, false, false, false, true);
|
||||||
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void switchRedundantOperationTest() {
|
void switchRedundantOperationTest() {
|
||||||
|
|
Loading…
Reference in New Issue