aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/htmlroff
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/htmlroff')
-rw-r--r--src/cmd/htmlroff/t11.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cmd/htmlroff/t11.c b/src/cmd/htmlroff/t11.c
index 53d68aac..dd1dd75b 100644
--- a/src/cmd/htmlroff/t11.c
+++ b/src/cmd/htmlroff/t11.c
@@ -72,8 +72,13 @@ e_w(void)
{
Rune *a;
Rune buf[40];
-
+ static Rune zero;
+
a = getqarg();
+ if(a == nil){
+ warn("no arg for \\w");
+ a = &zero;
+ }
runesnprint(buf, sizeof buf, "%ld", runestrlen(a));
pushinputstring(buf);
nr(L("st"), 0);