1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 12:36:17 +02:00

Fixed code that removes comma at end of extensions list

In C++, the end() iterator points to the point after the last element,
not the last element itself. It is therefore not a valid target for
erase().
This commit is contained in:
Maarten ter Huurne 2014-09-17 14:00:16 +02:00
parent e7248ae008
commit 4997438c11

View File

@ -202,7 +202,7 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, string const& linkfile, bool deletable)
/* Remove last comma */ /* Remove last comma */
if (!selectorfilter.empty()) { if (!selectorfilter.empty()) {
selectorfilter.erase(selectorfilter.end()); selectorfilter.pop_back();
DEBUG("Compatible extensions: %s\n", selectorfilter.c_str()); DEBUG("Compatible extensions: %s\n", selectorfilter.c_str());
} }