From 5896aea0ca6893d4b39e66b6f49afbeb63d78c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Mon, 11 Dec 2023 01:37:01 +0100 Subject: [PATCH] Fix a `*printf()` format string on Windows --- NEWS.md | 2 ++ src/errors.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 1748162..054b273 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # keypress (development version) +- Fix a `*printf()` format string on Windows. + # keypress 1.3.0 - Allow turning echo off for non-blocking Linux and macOS terminals diff --git a/src/errors.c b/src/errors.c index bd3a043..eace8b8 100644 --- a/src/errors.c +++ b/src/errors.c @@ -51,7 +51,7 @@ SEXP r_throw_system_error(const char *func, const char *filename, int line, va_start(args, msg); vsnprintf(errorbuf, ERRORBUF_SIZE, msg, args); va_end(args); - error("%s (system error %d, %s) @%s:%d (%s)", errorbuf, errorcode, + error("%s (system error %ld, %s) @%s:%d (%s)", errorbuf, errorcode, realsysmsg, filename, line, func); return R_NilValue; }