Skip to content

Commit d40eb87

Browse files
committed
bfstd: Actually use the copied locale
This fixes a segfault in xstrerror() when using musl.
1 parent 2acd897 commit d40eb87

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/bfstd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ const char *xstrerror(int errnum) {
301301
}
302302

303303
if (copy != (locale_t)0) {
304-
ret = strerror_l(errnum, loc);
304+
ret = strerror_l(errnum, copy);
305305
}
306306

307307
if (loc == LC_GLOBAL_LOCALE) {

0 commit comments

Comments
 (0)