예제 #1
0
static jboolean checkBounds(Env* env, Array* array, jint start, jint len) {
    jsize length = array->length;
    jsize end = start + len;
    if (start < 0 || len < 0 || end > length) {
        rvmThrowArrayIndexOutOfBoundsException(env, length, start);
        return FALSE;
    }
    return TRUE;
}
예제 #2
0
파일: bc.c 프로젝트: SinoJerk/robovm
void _bcThrowArrayIndexOutOfBoundsException(Env* env, jint length, jint index) {
    ENTER;
    rvmThrowArrayIndexOutOfBoundsException(env, length, index);
    LEAVEV;
}