From: Helge Norberg Date: Tue, 1 Mar 2016 16:06:11 +0000 (+0100) Subject: Fixed bug in image_producer where a file with . in the name (except for extension... X-Git-Tag: 2.1.0_Beta1~104 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=f61ec7ff24de5b1096c1df6a1decbed51665052e;p=casparcg Fixed bug in image_producer where a file with . in the name (except for extension .) would cause an access violation --- diff --git a/modules/image/producer/image_producer.cpp b/modules/image/producer/image_producer.cpp index 92f805145..70902fd1d 100644 --- a/modules/image/producer/image_producer.cpp +++ b/modules/image/producer/image_producer.cpp @@ -265,7 +265,7 @@ spl::shared_ptr create_producer(const core::frame_producer auto ext = std::find_if(g_extensions.begin(), g_extensions.end(), [&](const std::wstring& ex) -> bool { - auto file = caspar::find_case_insensitive(boost::filesystem::path(filename).replace_extension(ex).wstring()); + auto file = caspar::find_case_insensitive(boost::filesystem::path(filename).wstring() + ex); return static_cast(file); }); @@ -283,7 +283,7 @@ spl::shared_ptr create_thumbnail_producer(const core::fram auto ext = std::find_if(g_extensions.begin(), g_extensions.end(), [&](const std::wstring& ex) -> bool { - auto file = caspar::find_case_insensitive(boost::filesystem::path(filename).replace_extension(ex).wstring()); + auto file = caspar::find_case_insensitive(boost::filesystem::path(filename).wstring() + ex); return static_cast(file); });