| Index: Source/WebCore/html/HTMLSelectElement.cpp
|
| ===================================================================
|
| --- Source/WebCore/html/HTMLSelectElement.cpp (revision 130718)
|
| +++ Source/WebCore/html/HTMLSelectElement.cpp (working copy)
|
| @@ -1514,8 +1514,10 @@
|
| return;
|
|
|
| int selected = selectedIndex();
|
| - int index = (optionToListIndex(selected >= 0 ? selected : 0) + searchStartOffset) % itemCount;
|
| - ASSERT(index >= 0);
|
| + int index = optionToListIndex(selected >= 0 ? selected : 0) + searchStartOffset;
|
| + if (index < 0)
|
| + return;
|
| + index %= itemCount;
|
|
|
| // Compute a case-folded copy of the prefix string before beginning the search for
|
| // a matching element. This code uses foldCase to work around the fact that
|
|
|