mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 00:39:41 +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:
parent
e7248ae008
commit
4997438c11
@ -202,7 +202,7 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, string const& linkfile, bool deletable)
|
||||
|
||||
/* Remove last comma */
|
||||
if (!selectorfilter.empty()) {
|
||||
selectorfilter.erase(selectorfilter.end());
|
||||
selectorfilter.pop_back();
|
||||
DEBUG("Compatible extensions: %s\n", selectorfilter.c_str());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user