make madmutt build properly in a separate build directory.
[apps/madmutt.git] / lib-lib / str.c
index 53f6ebb..30198aa 100644 (file)
@@ -248,9 +248,12 @@ 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;
+            pos += nb;
         }
     }