Skip to content

Commit

Permalink
bfstd: Actually use the copied locale
Browse files Browse the repository at this point in the history
This fixes a segfault in xstrerror() when using musl.
  • Loading branch information
tavianator committed Oct 13, 2023
1 parent 2acd897 commit d40eb87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bfstd.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ const char *xstrerror(int errnum) {
}

if (copy != (locale_t)0) {
ret = strerror_l(errnum, loc);
ret = strerror_l(errnum, copy);
}

if (loc == LC_GLOBAL_LOCALE) {
Expand Down

0 comments on commit d40eb87

Please sign in to comment.