From fcf8de5023f87dad3c7d95658bf6be24c75aa9c2 Mon Sep 17 00:00:00 2001 From: fenlog Date: Fri, 17 Dec 2021 17:11:41 +0800 Subject: [PATCH] Add %I64d/u for printf-style on windows. --- include/fmt/printf.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/fmt/printf.h b/include/fmt/printf.h index 19d550f6..207a4b7d 100644 --- a/include/fmt/printf.h +++ b/include/fmt/printf.h @@ -485,6 +485,23 @@ void vprintf(buffer& buf, basic_string_view format, // printf produces garbage when 'L' is omitted for long double, no // need to do the same. break; + case 'I': + if (t == '6') { + ++it; + t = it != end ? *it : 0; + if (t == '4') { + ++it; + t = it != end ? *it : 0; + convert_arg(arg, t); + } + else { + convert_arg(arg, t); + } + } + else { + convert_arg(arg, t); + } + break; default: --it; convert_arg(arg, c);