framebuffer_ng: make setIconBasePath more robust

...by appending a slash if the caller doesn't supply one.


Origin commit data
------------------
Branch: ni/coolstream
Commit: e8ff0c7d09
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2015-12-13 (Sun, 13 Dec 2015)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2015-12-13 18:20:13 +01:00
parent d9a01b43e3
commit d1c820e0f3

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)