Skip to content

Commit db69b2a

Browse files
authored
fix ListFind test (#2436)
1 parent 5874271 commit db69b2a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Content.Tests/DMProject/Tests/List/ListFind.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
ASSERT(L.Find("b", 3, 0) == 0)
1313

1414
ASSERT(L.Find("b", 1, 1) == 0)
15-
ASSERT(L.Find("b", 1, 2) == 2)
15+
ASSERT(L.Find("b", 1, 2) == 0)
1616
ASSERT(L.Find("b", 1, 3) == 2)
1717

1818
ASSERT(L.Find("b", new /datum) == 2)

OpenDreamRuntime/Objects/Types/DreamList.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public virtual bool ContainsKey(DreamValue value) {
221221
public virtual int FindValue(DreamValue value, int start = 1, int end = 0) {
222222
if (end == 0 || end > _values.Count) end = _values.Count;
223223

224-
for (int i = start; i <= end; i++) {
224+
for (int i = start; i < end; i++) {
225225
if (_values[i - 1].Equals(value)) return i;
226226
}
227227

0 commit comments

Comments
 (0)