summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 17:02:47 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 17:02:47 +0000
commit2519f2ecacdb7e9dac9875649cda3b8cc448fdce (patch)
tree68124f895dc137a195d8d568b43787b1d6525b77
parent3dded9f4866e073088efe4dc9ca3994dc7bef553 (diff)
* Ensure that the comparison of the "yes" character in ...
Author: mdz Date: 2003-08-09 00:26:29 GMT * Ensure that the comparison of the "yes" character in YnPrompt is done with unsigned values, so that 8-bit characters work correctly. This should probably all use nl_langinfo(YESEXPR) at some point instead. (Closes: #200953) * Pass the translated character through toupper(3), so that it doesn't really matter anymore whether the translated string is uppercase
-rw-r--r--cmdline/apt-get.cc8
-rw-r--r--debian/changelog10
2 files changed, 12 insertions, 6 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index ab069ddc2..f744177e3 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-get.cc,v 1.136 2003/08/08 23:48:48 mdz Exp $
+// $Id: apt-get.cc,v 1.137 2003/08/09 00:26:30 mdz Exp $
/* ######################################################################
apt-get - Cover for dpkg
@@ -121,15 +121,15 @@ bool YnPrompt()
return true;
}
- char C = 0;
- char Jnk = 0;
+ unsigned char C = 0;
+ unsigned char Jnk = 0;
if (read(STDIN_FILENO,&C,1) != 1)
return false;
while (C != '\n' && Jnk != '\n')
if (read(STDIN_FILENO,&Jnk,1) != 1)
return false;
- if (!(toupper(C) == *Yes || C == '\n' || C == '\r'))
+ if (!(toupper(C) == toupper((unsigned char)(*Yes)) || C == '\n' || C == '\r'))
return false;
return true;
}
diff --git a/debian/changelog b/debian/changelog
index eac78da81..c114c2abd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -25,8 +25,14 @@ apt (0.5.9) unstable; urgency=low
are Provided by a package which is already installed (Closes: #200395)
* Patch to update pt_BR man page for apt_preferences(5) from Andre Luis
Lopes <andrelop@debian.org> (Closes: #202245)
-
- -- Matt Zimmerman <mdz@debian.org> Fri, 8 Aug 2003 19:52:49 -0400
+ * Ensure that the comparison of the "yes" character in YnPrompt is done
+ with unsigned values, so that 8-bit characters work correctly. This
+ should probably all use nl_langinfo(YESEXPR) at some point instead.
+ (Closes: #200953)
+ * Pass the translated character through toupper(3), so that it doesn't
+ really matter anymore whether the translated string is uppercase
+
+ -- Matt Zimmerman <mdz@debian.org> Fri, 8 Aug 2003 20:25:40 -0400
apt (0.5.8) unstable; urgency=medium