|
@@ -1893,7 +1893,7 @@ var VRMLLoader = ( function () {
|
|
|
|
|
|
// an index of -1 indicates that the current face has ended and the next one begins
|
|
|
|
|
|
- if ( index[ i + 3 ] === - 1 ) {
|
|
|
+ if ( index[ i + 3 ] === - 1 || i + 3 >= l ) {
|
|
|
|
|
|
i += 3;
|
|
|
start = i + 1;
|
|
@@ -1924,7 +1924,7 @@ var VRMLLoader = ( function () {
|
|
|
|
|
|
// an index of -1 indicates that the current face has ended and the next one begins
|
|
|
|
|
|
- if ( index[ i + 3 ] === - 1 ) {
|
|
|
+ if ( index[ i + 3 ] === - 1 || i + 3 >= l ) {
|
|
|
|
|
|
i += 3;
|
|
|
start ++;
|
|
@@ -1972,7 +1972,7 @@ var VRMLLoader = ( function () {
|
|
|
|
|
|
// an index of -1 indicates that the current line has ended and the next one begins
|
|
|
|
|
|
- if ( index[ i + 2 ] === - 1 ) {
|
|
|
+ if ( index[ i + 2 ] === - 1 || i + 2 >= l ) {
|
|
|
|
|
|
i += 2;
|
|
|
|
|
@@ -2002,7 +2002,7 @@ var VRMLLoader = ( function () {
|
|
|
|
|
|
// an index of -1 indicates that the current line has ended and the next one begins
|
|
|
|
|
|
- if ( index[ i + 2 ] === - 1 ) {
|
|
|
+ if ( index[ i + 2 ] === - 1 || i + 2 >= l ) {
|
|
|
|
|
|
i += 2;
|
|
|
start ++;
|