about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-05-30 12:35:59 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-05-30 12:35:59 +0000
commitcba898f217ac837a2b8da9f40e6c754d3898eb46 (patch)
treea4caedda138948bec69af3b1d2388ae96a6d9088
parent5e22d7ee424dc58de4049a9ad65b50ec4728c206 (diff)
downloadzsh-cba898f217ac837a2b8da9f40e6c754d3898eb46.tar.gz
zsh-cba898f217ac837a2b8da9f40e6c754d3898eb46.tar.xz
zsh-cba898f217ac837a2b8da9f40e6c754d3898eb46.zip
18587: fix bug where only the beginning of the association key was compared
-rw-r--r--ChangeLog5
-rw-r--r--Src/Modules/langinfo.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 380d65cd9..dbee8f201 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-05-30  Oliver Kiddle  <opk@zsh.org>
+
+	* 18587: Src/Modules/langinfo.c: fix bug where only the beginning
+	of the association key was compared so MON_10 would match MON_1
+
 2003-05-28  Peter Stephenson  <pws@csr.com>
 
 	* unposted: Config/version.mk, Completion/Unix/Command/.distfiles,
diff --git a/Src/Modules/langinfo.c b/Src/Modules/langinfo.c
index 6b004fb2f..66d0228aa 100644
--- a/Src/Modules/langinfo.c
+++ b/Src/Modules/langinfo.c
@@ -388,7 +388,7 @@ liitem(char *name)
     nlcode = &nl_vals[0];
 
     for (element = (char **)nl_names; *element; element++, nlcode++) {
-	if ((!strncmp(*element, name, strlen(*element))))
+	if ((!strcmp(*element, name)))
 	    return nlcode;
     }