about summary refs log tree commit diff
path: root/src/locale
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 /src/locale
parent6894f8472614e22c76820b6469d2551d17e024ed (diff)
downloadmusl-01e6bbece2bdcac243cdb8dff6916f2bb80a19e1.tar.gz
musl-01e6bbece2bdcac243cdb8dff6916f2bb80a19e1.tar.xz
musl-01e6bbece2bdcac243cdb8dff6916f2bb80a19e1.zip
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.
Diffstat (limited to 'src/locale')
-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 a5ff8475..e48c50f0 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);
 	}