mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 18:01:13 +02:00
framebuffer_ng: make setIconBasePath more robust
...by appending a slash if the caller doesn't supply one.
This commit is contained in:
@@ -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)
|
void CFrameBuffer::setIconBasePath(const std::string & iconPath)
|
||||||
{
|
{
|
||||||
iconBasePath = 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)
|
void CFrameBuffer::getIconSize(const char * const filename, int* width, int *height)
|
||||||
|
Reference in New Issue
Block a user