Просмотр исходного кода

dselect: Fix word wrapping logic

The switch from integer literal to boolean literals botched one of the
assignments, which was turned from 1 to false, fix that now, and stop
turning parts of the code path dead.

Regression introduced in commit cf21cccb98bdb31a84bbe1aa1217c712b47aedd2.

Warned-by: coverity
Guillem Jover лет назад: 12
Родитель
Сommit
42f8e27790
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      debian/changelog
  2. 1 1
      dselect/baselist.cc

+ 1 - 0
debian/changelog

@@ -4,6 +4,7 @@ dpkg (1.17.10) UNRELEASED; urgency=low
   * Use libtool to build the static libraries, which makes it possible to
   * Use libtool to build the static libraries, which makes it possible to
     embed libcompat inside libdpkg, as required by some external programs
     embed libcompat inside libdpkg, as required by some external programs
     linking against the latter. Closes: #746122
     linking against the latter. Closes: #746122
+  * Fix word wrapping logic in dselect. Regression introduced in dpkg 1.17.3.
 
 
   [ Updated manpages translations ]
   [ Updated manpages translations ]
   * German (Helge Kreutzmann).
   * German (Helge Kreutzmann).

+ 1 - 1
dselect/baselist.cc

@@ -364,7 +364,7 @@ void baselist::wordwrapinfo(int offset, const char *m) {
         if (l <= 0) break;
         if (l <= 0) break;
         waddch(infopad,'\n');
         waddch(infopad,'\n');
       }
       }
-      wrapping = false;
+      wrapping = true;
     }
     }
     if (!p) break;
     if (!p) break;
     if (getcury(infopad) == (MAX_DISPLAY_INFO - 1)) {
     if (getcury(infopad) == (MAX_DISPLAY_INFO - 1)) {