esubtitle.h: fix compiler warnings
[enigma2.git] / main / bsod.cpp
index 583107d..aeb31c4 100644 (file)
@@ -92,6 +92,11 @@ void bsodFatal(const char *component)
                        if (end == std::string::npos)
                                break;
                        end = lines.rfind("/", end);
                        if (end == std::string::npos)
                                break;
                        end = lines.rfind("/", end);
+                               /* skip a potential prefix to the path */
+                       unsigned int path_prefix = lines.find("/usr/", start);
+                       if (path_prefix != std::string::npos && path_prefix < end)
+                               start = path_prefix;
+
                        if (end == std::string::npos)
                                break;
                        if (end - start >= (256 - strlen(INFOFILE)))
                        if (end == std::string::npos)
                                break;
                        if (end - start >= (256 - strlen(INFOFILE)))