Skip to content

Conversation

@octopoulos
Copy link

  1. Crash fix, reproduce like this:
  • open sigma2 databin
  • go to 00003.LANG, strpack 2 => crash

Why does it crash? Because ImGui::Text(something) was used and the something contained %s, without argument.
ImGui::Text always formats (like printf) => replaced with ImGui::TextUnformatted

  1. Made the code more compact using macros for very repetitive things having lots of copy paste => it's also a lot more readable now, and faster too because it's not using Text when not needed.
  • you might want to move the macros somewhere else than stdafx.h
  • you might want to replace them with functions (not so important I think)

Basically I was just going to fix the crash then thought I might as well do #2.
Now I see some other things that could be done.

@Mystixor
Copy link
Owner

Thank you very much for your PR. I was not yet aware of this problem with ImGui::Text but of course this is a very important fix! I generally like your solution, some of the formatting changed a bit between master and your PR so I will be fixing this up again, no worries. Generally, I'd like PRs to go to the dev branch, as master will always remain on the level of the latest release and currently it's already behind the dev branch again, but I wanted to make a new release with it soon-ish anyway.
Please note that this PR is unrelated to #2, which was already fixed and pushed to master last month.
Of course, for the next release then I will add your name to the About > Contributors list. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants