diff options
author | Syoyo Fujita <syoyo@lighttransport.com> | 2017-05-24 14:59:56 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-24 14:59:56 +0900 |
commit | 41acdc95bcb40194fe55b9684cbc57d45ae03f98 (patch) | |
tree | 2caad52a3c4839001f7b29a04283caec000d2a44 | |
parent | 889b2187c1baa2e918069ae7fb7b14348ba4574b (diff) | |
parent | cc948e4c443aac525ca3822c602ae871dc35c9a6 (diff) | |
download | tinyobjloader-41acdc95bcb40194fe55b9684cbc57d45ae03f98.tar.gz |
Merge pull request #126 from alangfel/multiple_texoptions
Deal with more than one texture option
-rw-r--r-- | tiny_obj_loader.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tiny_obj_loader.h b/tiny_obj_loader.h index ee44076..a666f33 100644 --- a/tiny_obj_loader.h +++ b/tiny_obj_loader.h @@ -788,6 +788,7 @@ static bool ParseTextureNameAndOption(std::string *texname, const char *token = linebuf; // Assume line ends with NULL while (!IS_NEW_LINE((*token))) { + token += strspn(token, " \t"); // skip space if ((0 == strncmp(token, "-blendu", 7)) && IS_SPACE((token[7]))) { token += 8; texopt->blendu = parseOnOff(&token, /* default */ true); @@ -831,7 +832,6 @@ static bool ParseTextureNameAndOption(std::string *texname, parseReal2(&(texopt->brightness), &(texopt->contrast), &token, 0.0, 1.0); } else { // Assume texture filename - token += strspn(token, " \t"); // skip space size_t len = strcspn(token, " \t\r"); // untile next space texture_name = std::string(token, token + len); token += len; |