Skip to content

Commit a430c40

Browse files
authored
Bug in Windows swift_vasprintf()
1 parent 37c9fb4 commit a430c40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/runtime/Errors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ static int swift_vasprintf(char **strp, const char *fmt, va_list ap) {
242242
char *buffer = reinterpret_cast<char *>(malloc(len + 1));
243243
if (!buffer)
244244
return -1;
245-
int result = vsprintf(*strp, fmt, ap);
245+
int result = vsprintf(buffer, fmt, ap);
246246
if (result < 0) {
247247
free(buffer);
248248
return -1;

0 commit comments

Comments
 (0)