mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +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)
|
||||
{
|
||||
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)
|
||||
|
Reference in New Issue
Block a user