From c2ac5d40d2a01a5aa4018ba001aadca678adc56c Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Thu, 27 Jul 2017 10:04:22 +0200 Subject: [PATCH] restore abs-unsigned patch it is not yet in upstream :/ Signed-off-by: Igor Gnatenko --- 0ad-abs-unsigned.diff | 12 ++++++++++++ 0ad.spec | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 0ad-abs-unsigned.diff diff --git a/0ad-abs-unsigned.diff b/0ad-abs-unsigned.diff new file mode 100644 index 0000000..12b361f --- /dev/null +++ b/0ad-abs-unsigned.diff @@ -0,0 +1,12 @@ +diff -uNr 0ad-0.0.22-alpha.orig/source/gui/CDropDown.cpp 0ad-0.0.22-alpha/source/gui/CDropDown.cpp +--- 0ad-0.0.22-alpha.orig/source/gui/CDropDown.cpp 2017-06-30 01:39:12.000000000 +0200 ++++ 0ad-0.0.22-alpha/source/gui/CDropDown.cpp 2017-07-27 10:03:04.647238245 +0200 +@@ -352,7 +352,7 @@ + int diff = 0; + for (size_t j = 0; j < m_InputBuffer.length(); ++j) + { +- diff = std::abs(pList->m_Items[i].GetRawString().LowerCase()[j] - (int)m_InputBuffer[j]); ++ diff = std::abs((int)pList->m_Items[i].GetRawString().LowerCase()[j] - (int)m_InputBuffer[j]); + if (diff == 0) + indexOfDifference = j+1; + else diff --git a/0ad.spec b/0ad.spec index 2769d81..4e30765 100644 --- a/0ad.spec +++ b/0ad.spec @@ -110,6 +110,9 @@ Patch3: %{name}-valgrind.patch # And other fixes Patch4: %{name}-mozjs-incompatible.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1423200 +Patch5: %{name}-abs-unsigned.diff + %description 0 A.D. (pronounced "zero ey-dee") is a free, open-source, cross-platform real-time strategy (RTS) game of ancient warfare. In short, it is a @@ -132,6 +135,7 @@ hobbyist game developers, since 2001. %endif %patch3 -p0 %patch4 -p1 +%patch5 -p1 %if %{with system_nvtt} rm -fr libraries/source/nvtt