summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-12 23:45:40 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-12 23:45:40 -0400
commitd40eb87cc00f50a5debb8899eacb7fcf1065badf (patch)
treed20d37ddc85c364f0b71e7c4030a9d6b5b65b152 /src
parent2acd897857fe301dfc6f5a8648e0124cd8515b4e (diff)
downloadbfs-d40eb87cc00f50a5debb8899eacb7fcf1065badf.tar.xz
bfstd: Actually use the copied locale
This fixes a segfault in xstrerror() when using musl.
Diffstat (limited to 'src')
-rw-r--r--src/bfstd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bfstd.c b/src/bfstd.c
index e9214d4..a4ae439 100644
--- a/src/bfstd.c
+++ b/src/bfstd.c
@@ -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) {