diff --git a/src/UserData/UserDataCollections/UserDataCollectionRangeIterator.hpp b/src/UserData/UserDataCollections/UserDataCollectionRangeIterator.hpp index 7fe1767..f9f9045 100644 --- a/src/UserData/UserDataCollections/UserDataCollectionRangeIterator.hpp +++ b/src/UserData/UserDataCollections/UserDataCollectionRangeIterator.hpp @@ -14,7 +14,7 @@ namespace Porygon::UserData{ UserDataCollectionRangeIterator(size_t start, size_t end){ _start = start; _end = end; - _current = start; + _current = _start; } const Evaluation::EvalValue* GetCurrent() final{ diff --git a/tests/integration/UserDataTests.cpp b/tests/integration/UserDataTests.cpp index 2c91d07..6a84ee0 100644 --- a/tests/integration/UserDataTests.cpp +++ b/tests/integration/UserDataTests.cpp @@ -191,7 +191,7 @@ end auto obj = new UserDataTestObject(); auto parameter = new UserDataValue(HashedString::ConstHash("testObject"), obj); auto result = script->CallFunction(u"testFunc", {parameter}); - REQUIRE(result->EvaluateInteger() == 6); + REQUIRE(result->EvaluateInteger() == 10); delete obj; delete parameter; delete script;