From 6e2d530d6102da86b638b5e6f71764a109b29f11 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Mon, 25 Feb 2019 12:41:31 -0800 Subject: [PATCH] Fix incorrect code generation on Solaris Sparc. (#5208) On Solaris Sparc, calling NumToString() with a char called the primary version, not the signed char or unsigned char specializations, which caused integer to string conversions to be missed. --- include/flatbuffers/util.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/flatbuffers/util.h b/include/flatbuffers/util.h index 71e1973f1..275747b72 100644 --- a/include/flatbuffers/util.h +++ b/include/flatbuffers/util.h @@ -130,6 +130,9 @@ template<> inline std::string NumToString(signed char t) { template<> inline std::string NumToString(unsigned char t) { return NumToString(static_cast(t)); } +template<> inline std::string NumToString(char t) { + return NumToString(static_cast(t)); +} #if defined(FLATBUFFERS_CPP98_STL) template<> inline std::string NumToString(long long t) { char buf[21]; // (log((1 << 63) - 1) / log(10)) + 2