0ad/0ad-abs-unsigned.diff

13 lines
640 B
Diff

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