diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-10-12 23:45:40 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-10-12 23:45:40 -0400 |
commit | d40eb87cc00f50a5debb8899eacb7fcf1065badf (patch) | |
tree | d20d37ddc85c364f0b71e7c4030a9d6b5b65b152 | |
parent | 2acd897857fe301dfc6f5a8648e0124cd8515b4e (diff) | |
download | bfs-d40eb87cc00f50a5debb8899eacb7fcf1065badf.tar.xz |
bfstd: Actually use the copied locale
This fixes a segfault in xstrerror() when using musl.
-rw-r--r-- | src/bfstd.c | 2 |
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) { |