From c7e205be87a2215b3c7cbf0d9658ce81be0e50ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Schmith=C3=BCsen?= Date: Mon, 19 Aug 2019 16:16:43 +0200 Subject: [PATCH] when parsing a number from an int, also set the 'real value' to the value --- tiny_gltf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index 26e72b3..f4a93f9 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -242,7 +242,7 @@ class Value { boolean_value_(false) {} explicit Value(bool b) : type_(BOOL_TYPE) { boolean_value_ = b; } - explicit Value(int i) : type_(INT_TYPE) { int_value_ = i; } + explicit Value(int i) : type_(INT_TYPE) { int_value_ = i; real_value_ = i; } explicit Value(double n) : type_(REAL_TYPE) { real_value_ = n; } explicit Value(const std::string &s) : type_(STRING_TYPE) { string_value_ = s;