mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-25 16:17:10 +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 */
|
/* 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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user