Various small fixes

This commit is contained in:
WerWolv
2020-11-27 09:09:59 +01:00
parent ed572ececf
commit fde9dc7961
4 changed files with 7 additions and 9 deletions

View File

@@ -251,7 +251,7 @@ namespace hex::lang {
delete nonArrayVarDeclNode;
}
return { new PatternDataArray(offset, arrayOffset, varDeclNode->getVariableName(), entries, 0x00FFFFFF), arrayOffset };
return { new PatternDataArray(offset, arrayOffset, varDeclNode->getVariableName(), entries, arrayColor.value()), arrayOffset };
}
std::pair<PatternData*, size_t> Evaluator::createStringPattern(ASTNodeVariableDecl *varDeclNode, u64 offset) {

View File

@@ -59,7 +59,7 @@ namespace hex {
switch (this->m_currHashFunction) {
case 0: // CRC16
{
int polynomial = 0, init = 0;
static int polynomial = 0, init = 0;
ImGui::InputInt("Initial Value", &init, 0, 0, ImGuiInputTextFlags_CharsHexadecimal);
if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true;
@@ -83,7 +83,7 @@ namespace hex {
break;
case 1: // CRC32
{
int polynomial = 0, init = 0;
static int polynomial = 0, init = 0;
ImGui::InputInt("Initial Value", &init, 0, 0, ImGuiInputTextFlags_CharsHexadecimal);
if (ImGui::IsItemEdited()) this->m_shouldInvalidate = true;

View File

@@ -13,7 +13,6 @@ namespace hex {
this->m_mangledBuffer = new char[0xF'FFFF];
std::memset(this->m_mangledBuffer, 0x00, 0xF'FFFF);
this->m_demangledName = "< ??? >";
this->m_regexInput = new char[0xF'FFFF];
this->m_regexPattern = new char[0xF'FFFF];
@@ -28,6 +27,7 @@ namespace hex {
delete[] this->m_regexInput;
delete[] this->m_regexPattern;
delete[] this->m_replacePattern;
}
void ViewTools::drawDemangler() {