diff --git a/source/gui/widgets/listbox.cpp b/source/gui/widgets/listbox.cpp index cb45040a..837af8b3 100644 --- a/source/gui/widgets/listbox.cpp +++ b/source/gui/widgets/listbox.cpp @@ -841,8 +841,11 @@ namespace nana if (pos >= catobj.sorted.size()) throw std::out_of_range("listbox: Invalid item position."); - auto i = std::find(catobj.sorted.begin(), catobj.sorted.end(), pos); - return (i != catobj.sorted.end() ? *i : npos); + for (size_type i=0; i