aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libwc/wtf.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libwc/wtf.c b/libwc/wtf.c
index 69a8271..b8cfdc7 100644
--- a/libwc/wtf.c
+++ b/libwc/wtf.c
@@ -120,14 +120,10 @@ int
wtf_strwidth(wc_uchar *p)
{
int w = 0;
- size_t len;
while (*p) {
w += wtf_width(p);
- len = WTF_LEN_MAP[*p];
- if (len > strlen(p))
- len = strlen(p);
- p += len;
+ p += WTF_LEN_MAP[*p];
}
return w;
}