CommandHelper

CommandHelper

46.5k Downloads

Wrong error message with negative array index lookup overflow

LadyCailin opened this issue ยท 0 comments

commented

@args = array(0, 1, 2, 3); @args[-5] results in:
ms.lang.IndexOverflowException: The element at index "-1" does not exist

The check for negative indices should first look up the size to ensure that it doesn't overflow, and use the -5 index in the error message.