framebuffer_ng: make setIconBasePath more robust

...by appending a slash if the caller doesn't supply one.
This commit is contained in:
Stefan Seyfried
2015-12-13 18:20:13 +01:00
parent a775af135a
commit e8ff0c7d09

View File

@@ -713,6 +713,9 @@ void CFrameBuffer::paintHLineRel(int x, int dx, int y, const fb_pixel_t col)
void CFrameBuffer::setIconBasePath(const std::string & iconPath)
{
iconBasePath = iconPath;
if (!iconBasePath.empty() && '/' == *iconBasePath.rbegin()) /* .back() is only c++11 :-( */
return;
iconBasePath += "/";
}
void CFrameBuffer::getIconSize(const char * const filename, int* width, int *height)