summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-09-14 10:41:34 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-09-16 04:53:59 -0400
commitce42e187ebfc81174ed477f247f023ae094c9b24 (patch)
tree1d9f70855fc73bd3590cb4b9e13e013fb0b6cd65
parent90229c4b781184d0e59ac67afda90ed316f62bcd (diff)
downloadhaskell-ce42e187ebfc81174ed477f247f023ae094c9b24.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.
-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,