flightlessmango/MangoHud

Assertion failure when parsing config with empty lines

Lassebq opened this issue · 0 comments

Describe the bug
Assertion failure when parsing config

List relevant hardware/software information

  • Alpine Linux
  • 0.7.1, built from source tarball

To Reproduce

Create a config with empty lines in .config/MangoHud/MangoHud.conf

$ mangohud glxgears                
/usr/include/c++/13.2.1/bits/basic_string.h:1317: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::front() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&]: Assertion '!empty()' failed.
zsh: abort      mangohud glxgears

Expected behavior
Empty lines in the config won't crash mangohud

Additional context
Possible solution: https://stackoverflow.com/a/78011282