Merge pull request #2 from zeux/master

Fix .obj parsing when empty 'g' is last
This commit is contained in:
Richard Knight 2019-06-01 20:52:33 +01:00 committed by GitHub
commit c8e30d83b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1153,6 +1153,9 @@ void parse_buffer(fastObjData* data, const char* ptr, const char* end)
case 'n':
p = parse_normal(data, p);
break;
default:
p--; /* roll p++ back in case *p was a newline */
}
break;
@ -1165,6 +1168,9 @@ void parse_buffer(fastObjData* data, const char* ptr, const char* end)
case '\t':
p = parse_face(data, p);
break;
default:
p--; /* roll p++ back in case *p was a newline */
}
break;
@ -1177,6 +1183,9 @@ void parse_buffer(fastObjData* data, const char* ptr, const char* end)
case '\t':
p = parse_group(data, p);
break;
default:
p--; /* roll p++ back in case *p was a newline */
}
break;