diff --git a/source/gui/CDropDown.cpp b/source/gui/CDropDown.cpp index c2b18db7d8..686033af14 100644 --- a/source/gui/CDropDown.cpp +++ b/source/gui/CDropDown.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2016 Wildfire Games. +/* Copyright (C) 2017 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -347,7 +347,7 @@ InReaction CDropDown::ManuallyHandleEvent(const SDL_Event_* ev) int diff = 0; for (size_t j = 0; j < m_InputBuffer.length(); ++j) { - diff = abs(pList->m_Items[i].GetOriginalString().LowerCase()[j] - (int)m_InputBuffer[j]); + diff = std::abs(pList->m_Items[i].GetRawString().LowerCase()[j] - (int)m_InputBuffer[j]); if (diff == 0) indexOfDifference = j+1; else diff --git a/source/gui/GUItext.h b/source/gui/GUItext.h index 0cbccf1583..784d459317 100644 --- a/source/gui/GUItext.h +++ b/source/gui/GUItext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015 Wildfire Games. +/* Copyright (C) 2017 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -290,6 +290,11 @@ public: */ const CStrW& GetOriginalString() const { return m_OriginalString; } + /** + * Get String, stripped of tags + */ + const CStrW& GetRawString() const { return m_RawString; } + /** * Generate Text Call from specified range. The range * must span only within ONE TextChunk though. Otherwise