Skip to content

Commit

Permalink
Remove trailing carriage-returns from each input line in icewm-menu-f…
Browse files Browse the repository at this point in the history
…do for ice-wm/icewm#186.
  • Loading branch information
gijsbers committed Feb 25, 2025
1 parent 5f45f31 commit 720b5b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/fdomenu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ DesktopFile::DesktopFile(string filePath, const string &langWanted) {
while (dfile) {
line.clear();
std::getline(dfile, line);
while (line.empty() == false && line.back() == '\r') {
line.pop_back();
}
if (line.empty()) {
if (dfile.eof())
break;
Expand Down

0 comments on commit 720b5b2

Please sign in to comment.