From 137153b9f06f673bf2c2617d721ce2d53dbd5f25 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 11 Aug 2014 06:54:58 -0700 Subject: [PATCH] Take integer promotion into account. --- test/printf-test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/printf-test.cc b/test/printf-test.cc index 616afc55..973338b6 100644 --- a/test/printf-test.cc +++ b/test/printf-test.cc @@ -300,7 +300,7 @@ template std::string sprintf_int(std::string format, U value) { char buffer[BUFFER_SIZE]; char type = format[format.size() - 1]; - if (sizeof(T) < sizeof(U)) { + if (sizeof(T) < sizeof(int)) { if (type == 'd' || type == 'i') { typedef typename MakeSigned::Type Signed; safe_sprintf(buffer, format.c_str(), static_cast(value));