wxScanf with bool causes stack corruption
Opened this issue · 0 comments
dconnet commented
In tableelements.cpp, line 1762
bool isVariable = false;
wxSscanf(node->GetAttribute(wxT("Variable"), wxT("")), wxT("%d"), &isVariable);
this->m_fVariable = isVariable;
causes a stack corruption. (detected when using VS2017)
I fixed this with:
int isVariable = 0;
wxSscanf(node->GetAttribute(wxT("Variable"), wxT("")), wxT("%d"), &isVariable);
this->m_fVariable = !!isVariable;
I was using wxWidgets 3.1.2