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-17 19:46:29 -0400
commitaf32a4cb0c3c972149760c6bd8b0f8bfcbe384e2 (patch)
treeffc4129eaef06c1f2f8d25ac19721a38c1229e50
parent8edda01f171127bfc550ef8a0fa2a5d619e67b4e (diff)
downloadhaskell-af32a4cb0c3c972149760c6bd8b0f8bfcbe384e2.tar.gz
rts: Fix erroneous usage of vsnprintf
As pointed out in #18685, this should be snprintf not vsnprintf. This appears to be due to a cut-and-paste error. Fixes #18658. (cherry picked from commit 35ea92708e17c90e476167163ae24747a3f5508e)
-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,