From ca1ece34a7e53c5359d2160fb9434c53c1feea38 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Wed, 29 Nov 2023 07:59:37 -0600 Subject: [PATCH 1/2] Fix format string With patch from Tomas Kalibera --- inst/include/testthat/testthat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/include/testthat/testthat.h b/inst/include/testthat/testthat.h index de0b5df13..3862f1043 100644 --- a/inst/include/testthat/testthat.h +++ b/inst/include/testthat/testthat.h @@ -89,7 +89,7 @@ class r_streambuf : public std::streambuf { if (n == 1) Rprintf("%c", *s); else - Rprintf("%.*s", n, s); + Rprintf("%.*s", static_cast(n), s) return n; From e7edcad3b69e507434745e28c059ec4604011b33 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Wed, 29 Nov 2023 08:00:11 -0600 Subject: [PATCH 2/2] Oops --- inst/include/testthat/testthat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/include/testthat/testthat.h b/inst/include/testthat/testthat.h index 3862f1043..30067b529 100644 --- a/inst/include/testthat/testthat.h +++ b/inst/include/testthat/testthat.h @@ -89,7 +89,7 @@ class r_streambuf : public std::streambuf { if (n == 1) Rprintf("%c", *s); else - Rprintf("%.*s", static_cast(n), s) + Rprintf("%.*s", static_cast(n), s); return n;