diff --git a/src/driver/pictureviewer/pictureviewer.cpp b/src/driver/pictureviewer/pictureviewer.cpp index ab4539640..0e29a745d 100644 --- a/src/driver/pictureviewer/pictureviewer.cpp +++ b/src/driver/pictureviewer/pictureviewer.cpp @@ -541,7 +541,7 @@ fb_pixel_t * CPictureViewer::getImage(const std::string & name, int width, int h return false; } #ifdef FBV_SUPPORT_PNG - if (name.find(".png") != std::string::npos) + if ((name.find(".png") == (name.length() - 4)) && (fh_png_id(name.c_str()))) load_ret = png_load_ext(name.c_str(), &buffer, &x, &y, &bpp); else #endif