mirror of
https://github.com/thisistherk/fast_obj.git
synced 2025-04-04 21:15:04 +00:00
Merge pull request #2 from zeux/master
Fix .obj parsing when empty 'g' is last
This commit is contained in:
commit
c8e30d83b4
1 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue