From a095f58d981569cbe79d724a301ed04f0f92748d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 27 Jun 2022 09:40:22 +0100 Subject: [PATCH] crashtesting: fix assert seen on loading forum-nl-1226.ods Change-Id: If8c08a51b11a459a03b4a0604c1fb9897351e598 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136467 Reviewed-by: Michael Stahl Tested-by: Jenkins --- external/libnumbertext/EmptyString.patch1 | 13 +++++++++++++ external/libnumbertext/UnpackedTarball_libnumbertext.mk | 1 + 2 files changed, 14 insertions(+) create mode 100644 external/libnumbertext/EmptyString.patch1 diff --git a/external/libnumbertext/EmptyString.patch1 b/external/libnumbertext/EmptyString.patch1 new file mode 100644 index 000000000000..d6570117da09 --- /dev/null +++ b/external/libnumbertext/EmptyString.patch1 @@ -0,0 +1,13 @@ +--- a/src/Soros.cxx 2022-06-27 09:36:46.486075920 +0100 ++++ b/src/Soros.cxx 2022-06-27 09:37:52.594072196 +0100 +@@ -98,8 +98,8 @@ + s = regex_replace(s, quoteEnd, L""); + s = translate(s, c.substr(1), m.substr(1), L""); + replace(s, slash, L"\\\\"); // -> \\, ", ;, # +- begins.push_back(s[0] == L'^'); +- ends.push_back(s[s.length()-1] == L'$'); ++ begins.push_back(!s.empty() && s[0] == L'^'); ++ ends.push_back(!s.empty() && s[s.length()-1] == L'$'); + s = L"^" + regex_replace(s, wregex(L"^\\^"), L""); + s = regex_replace(s, wregex(L"\\$$"), L"") + L"$"; + try diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk b/external/libnumbertext/UnpackedTarball_libnumbertext.mk index 48cd2a9a273d..fb88366d5aef 100644 --- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk +++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk @@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libnumbertext,1)) $(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \ external/libnumbertext/MSVCNonBMPBug.patch1 \ external/libnumbertext/WinUnicodePath.patch1 \ + external/libnumbertext/EmptyString.patch1 \ )) # vim: set noet sw=4 ts=4: -- 2.11.4.GIT