mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
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:
@@ -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