mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-06-10 04:03:49 +00:00
Compare commits
7 Commits
filesize-c
...
v2.8.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
350c296802 | ||
|
|
cc93e1fd25 | ||
|
|
59cc44ad4f | ||
|
|
5c06b7d03b | ||
|
|
a75355b018 | ||
|
|
a977f7a16f | ||
|
|
49caa65177 |
@@ -301,6 +301,9 @@ class Value {
|
||||
}
|
||||
explicit Value(std::string &&s)
|
||||
: type_(STRING_TYPE), string_value_(std::move(s)) {}
|
||||
explicit Value(const char *s) : type_(STRING_TYPE) {
|
||||
string_value_ = s;
|
||||
}
|
||||
explicit Value(const unsigned char *p, size_t n) : type_(BINARY_TYPE) {
|
||||
binary_value_.resize(n);
|
||||
memcpy(binary_value_.data(), p, n);
|
||||
@@ -2422,7 +2425,7 @@ static bool LoadExternalFile(std::vector<unsigned char> *out, std::string *err,
|
||||
|
||||
size_t file_size{0};
|
||||
std::string _err;
|
||||
bool ok = fs-GetFileSizeInBytes(&file_size, &_err, filepath, fs->user_data);
|
||||
bool ok = fs->GetFileSizeInBytes(&file_size, &_err, filepath, fs->user_data);
|
||||
if (!ok) {
|
||||
if (_err.size()) {
|
||||
if (failMsgOut) {
|
||||
@@ -7155,7 +7158,7 @@ static void SerializeGltfAnimationChannel(const AnimationChannel &channel,
|
||||
{
|
||||
detail::json target;
|
||||
|
||||
if (channel.target_node > 0) {
|
||||
if (channel.target_node >= 0) {
|
||||
SerializeNumberProperty("node", channel.target_node, target);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user