summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-09-14 10:41:34 -0400
committerBen Gamari <ben@smart-cactus.org>2020-09-14 10:42:15 -0400
commit35ea92708e17c90e476167163ae24747a3f5508e (patch)
tree67b4375eb609985f1946aa8ed2319f3df173fdef
parent4798caa0fefd7adf4c5b85fa84a6f28fcc6b350b (diff)
downloadhaskell-wip/T18658.tar.gz
rts: Fix erroneous usage of vsnprintfwip/T18658
As pointed out in #18685, this should be snprintf not vsnprintf. This appears to be due to a cut-and-paste error. Fixes #18658.
-rw-r--r--rts/RtsMessages.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/RtsMessages.c b/rts/RtsMessages.c
index 6f13580e06..c816322a63 100644
--- a/rts/RtsMessages.c
+++ b/rts/RtsMessages.c
@@ -248,7 +248,7 @@ rtsSysErrorMsgFn(const char *s, va_list ap)
r = vsnprintf(buf, BUFSIZE, s, ap);
if (r > 0 && r < BUFSIZE) {
- r = vsnprintf(buf+r, BUFSIZE-r, ": %s", syserr);
+ r = snprintf(buf+r, BUFSIZE-r, ": %s", syserr);
MessageBox(NULL /* hWnd */,
buf,
prog_name,