Skip to content

Commit

Permalink
fixed parsing text format
Browse files Browse the repository at this point in the history
  • Loading branch information
nem0 committed Sep 23, 2023
1 parent dde6cbe commit 0f53d04
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ofbx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,14 @@ static OptionalError<Property*> readTextProperty(Cursor* cursor, Allocator& allo

prop->value.end = cursor->current;
}
else if (cursor->current < cursor->end && (*cursor->current == 'e' || *cursor->current == 'E')) {
prop->type = 'D';
// 10e-013
++cursor->current;
if (cursor->current < cursor->end && *cursor->current == '-') ++cursor->current;
while (cursor->current < cursor->end && isdigit(*cursor->current)) ++cursor->current;
prop->value.end = cursor->current;
}
return prop;
}

Expand Down

0 comments on commit 0f53d04

Please sign in to comment.