| 322 | } |
| 323 | |
| 324 | int Marshaller::getArrayItem(int index, int arrayIndex) { |
| 325 | auto array = getArray(index); |
| 326 | if (!_exceptionTracker) { |
| 327 | return 0; |
| 328 | } |
| 329 | |
| 330 | auto arrayIndexSizeT = static_cast<size_t>(arrayIndex); |
| 331 | if (arrayIndex < 0 || arrayIndexSizeT >= array->size()) { |
| 332 | _exceptionTracker.onError( |
| 333 | Error(STRING_FORMAT("Out of bounds index {}, array size is {}", arrayIndex, array->size()))); |
| 334 | return 0; |
| 335 | } |
| 336 | return push((*array)[arrayIndexSizeT]); |
| 337 | } |
| 338 | |
| 339 | void Marshaller::setArrayItem(int index, int arrayIndex) { |
| 340 | auto array = getArray(index); |