File: fix-loop-in-split

package info (click to toggle)
paps 0.6.8-7.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, stretch
  • size: 2,192 kB
  • ctags: 665
  • sloc: sh: 9,020; ansic: 1,681; makefile: 78
file content (18 lines) | stat: -rw-r--r-- 466 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Fix an error on autoreconf
Origin: Fedora project, paps 0.6.8-14
Author: Akira TAGOH <tagoh@redhat.com>
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=618483

--- a/src/paps.c
+++ b/src/paps.c
@@ -642,7 +642,9 @@
 		    }
 		  for (i = 0; i < len; i++)
 		    {
-		      wwidth += wcwidth (wtext[i]);
+		      gssize w = wcwidth(wtext[i]);
+		      if (w >= 0)
+			  wwidth += w;
 		      if (wwidth > n)
 			  break;
 		      wnewtext[i] = wtext[i];