Update FBXParser.cpp

add missing brackets.
pull/2971/head
Kim Kulling 2020-02-10 23:59:52 +01:00 committed by GitHub
parent 5e979d72c9
commit 58990d4e3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -368,8 +368,9 @@ float ParseTokenAsFloat(const Token& t, const char*& err_out)
// which fast_atof could interpret as decimal point.
#define MAX_FLOAT_LENGTH 31
const size_t length = static_cast<size_t>(t.end()-t.begin());
if (length > MAX_FLOAT_LENGTH)
if (length > MAX_FLOAT_LENGTH) {
return 0.f;
}
char temp[MAX_FLOAT_LENGTH + 1];
std::copy(t.begin(), t.end(), temp);