changeset 19568:7759e4d62f04 stable

mkoctfile.in.cc: Fix infinite loop of mkoctfile -M (Bug #43640) * mkoctfile.in.cc: Fix infinite loop of mkoctfile -M on platforms where char is unsigned. Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770192 Reviewed-by: Sébastien Villemot <sebastien@debian.org> Pushed-by: Andreas Weber <andy.weber.aw@gmail.com>
author Edmund Grimley Evans <edmund.grimley.evans@gmail.com>
date Tue, 02 Dec 2014 11:43:13 +0100
parents 3492b771c2e6
children 302eef6de090 ef649fe230f5
files src/mkoctfile.in.cc
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/mkoctfile.in.cc
+++ b/src/mkoctfile.in.cc
@@ -70,11 +70,11 @@
 {
   static std::vector<char> buf (100);
   unsigned int idx = 0;
-  char c;
+  int c;
 
   while (true)
     {
-      c = static_cast<char> (gnulib::fgetc (fp));
+      c = gnulib::fgetc (fp);
       if (c == '\n' || c == EOF)
         break;
       if (buf.size () <= idx)