ffmpeg-6: fix COMPONENT_REVISION
[oi-userland.git] / components / web / firefox / patches / Bug1450912.patch
blob328a7be6002a9fdc8e88e4ffe019efe54e3e5029
1 Workaround for:
3 https://bugzilla.mozilla.org/show_bug.cgi?id=1450912
5 Should be more investigated and reopen bug.
7 diff -r c56ef1c14a55 gfx/gl/GLContext.cpp
8 --- a/gfx/gl/GLContext.cpp Wed Mar 14 00:40:07 2018 +0200
9 +++ b/gfx/gl/GLContext.cpp Wed Apr 04 14:51:13 2018 +0000
10 @@ -204,12 +204,11 @@
12 static bool ParseVersion(const std::string& versionStr,
13 uint32_t* const out_major, uint32_t* const out_minor) {
14 - static const std::regex kVersionRegex("([0-9]+)\\.([0-9]+)");
15 - std::smatch match;
16 - if (!std::regex_search(versionStr, match, kVersionRegex)) return false;
18 - const auto& majorStr = match.str(1);
19 - const auto& minorStr = match.str(2);
20 + size_t dot_index = versionStr.find('.', 0);
21 + if (dot_index == -1)
22 + return false;
23 + const auto& majorStr = versionStr.substr(0, dot_index);
24 + const auto& minorStr = versionStr.substr(dot_index+1, 2);
25 *out_major = atoi(majorStr.c_str());
26 *out_minor = atoi(minorStr.c_str());
27 return true;