diff options
author | Shane Loretz <sloretz@osrfoundation.org> | 2017-06-01 14:09:15 -0700 |
---|---|---|
committer | Shane Loretz <sloretz@osrfoundation.org> | 2017-06-01 14:09:15 -0700 |
commit | 0f4a955e0164e14aa108539f41eba38dd54a0402 (patch) | |
tree | 8bdd9d77d80fd73c093ec2d3b311ce8ef9be958e | |
parent | fb80e0421275403a929743cad86b71de7ffd646e (diff) | |
download | tinyobjloader-0f4a955e0164e14aa108539f41eba38dd54a0402.tar.gz |
4096 -> TINYOBJ_SSCANF_BUFFER_SIZE
-rw-r--r-- | tiny_obj_loader.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tiny_obj_loader.h b/tiny_obj_loader.h index 1006070..07a876c 100644 --- a/tiny_obj_loader.h +++ b/tiny_obj_loader.h @@ -1676,7 +1676,7 @@ bool LoadObj(attrib_t *attrib, std::vector<shape_t> *shapes, if (token[0] == 't' && IS_SPACE(token[1])) { tag_t tag; - char namebuf[4096]; + char namebuf[TINYOBJ_SSCANF_BUFFER_SIZE]; token += 2; #ifdef _MSC_VER sscanf_s(token, "%s", namebuf, (unsigned)_countof(namebuf)); @@ -1704,7 +1704,7 @@ bool LoadObj(attrib_t *attrib, std::vector<shape_t> *shapes, tag.stringValues.resize(static_cast<size_t>(ts.num_strings)); for (size_t i = 0; i < static_cast<size_t>(ts.num_strings); ++i) { - char stringValueBuffer[4096]; + char stringValueBuffer[TINYOBJ_SSCANF_BUFFER_SIZE]; #ifdef _MSC_VER sscanf_s(token, "%s", stringValueBuffer, @@ -1986,7 +1986,7 @@ bool LoadObjWithCallback(std::istream &inStream, const callback_t &callback, if (token[0] == 't' && IS_SPACE(token[1])) { tag_t tag; - char namebuf[4096]; + char namebuf[TINYOBJ_SSCANF_BUFFER_SIZE]; token += 2; #ifdef _MSC_VER sscanf_s(token, "%s", namebuf, (unsigned)_countof(namebuf)); @@ -2014,7 +2014,7 @@ bool LoadObjWithCallback(std::istream &inStream, const callback_t &callback, tag.stringValues.resize(static_cast<size_t>(ts.num_strings)); for (size_t i = 0; i < static_cast<size_t>(ts.num_strings); ++i) { - char stringValueBuffer[4096]; + char stringValueBuffer[TINYOBJ_SSCANF_BUFFER_SIZE]; #ifdef _MSC_VER sscanf_s(token, "%s", stringValueBuffer, |