aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2017-01-29 00:11:23 -0500
committerRich Felker <dalias@aerifal.cx>2017-01-29 00:11:23 -0500
commit01e6bbece2bdcac243cdb8dff6916f2bb80a19e1 (patch)
tree8db96e32b675b6c2505ae1c8df6ef8c140f227d1
parent6894f8472614e22c76820b6469d2551d17e024ed (diff)
downloadmusl-01e6bbece2bdcac243cdb8dff6916f2bb80a19e1.zip
musl-01e6bbece2bdcac243cdb8dff6916f2bb80a19e1.tar.gz
musl-01e6bbece2bdcac243cdb8dff6916f2bb80a19e1.tar.bz2
fix bindtextdomain logic error deactivating other domains
this loop was only supposed to deactivate other bindings for the same text domain name, but due to copy-and-paste error, deactivated all other bindings. patch by He X.
-rw-r--r--src/locale/dcngettext.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/locale/dcngettext.c b/src/locale/dcngettext.c
index a5ff847..e48c50f 100644
--- a/src/locale/dcngettext.c
+++ b/src/locale/dcngettext.c
@@ -74,7 +74,7 @@ char *bindtextdomain(const char *domainname, const char *dirname)
a_store(&p->active, 1);
for (q=bindings; q; q=q->next) {
- if (!strcmp(p->domainname, domainname) && q != p)
+ if (!strcmp(q->domainname, domainname) && q != p)
a_store(&q->active, 0);
}