I don't understand how I missed that before...
authorPierre Habouzit <madcoder@debian.org>
Thu, 17 May 2007 20:20:34 +0000 (22:20 +0200)
committerPierre Habouzit <madcoder@debian.org>
Thu, 17 May 2007 20:20:34 +0000 (22:20 +0200)
lib-lib/str.c

index c71c459..30198aa 100644 (file)
@@ -248,6 +248,9 @@ ssize_t m_strwidth (const char *s)
 
           case -1: /* assume we will replace that char with a ? later */
             wc = '?';
+            pos ++;
+            break;
+
           default:
             w   += iswprint(wc) ? wcwidth(wc) : 1;
             pos += nb;