aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/0007-fix-bindtextdomain-logic-error-deactivating-other-do.patch
blob: bacb3bc8e8e80ed99abb96919813c91e4a834999 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 01e6bbece2bdcac243cdb8dff6916f2bb80a19e1 Mon Sep 17 00:00:00 2001
From: Rich Felker <dalias@aerifal.cx>
Date: Sun, 29 Jan 2017 00:11:23 -0500
Subject: [PATCH] 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.
---
 src/locale/dcngettext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
 	}
 
-- 
2.11.1