summaryrefslogtreecommitdiff
path: root/src/roff/troff/input.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/roff/troff/input.cc')
-rw-r--r--src/roff/troff/input.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/roff/troff/input.cc b/src/roff/troff/input.cc
index ee7833b4..366d77fd 100644
--- a/src/roff/troff/input.cc
+++ b/src/roff/troff/input.cc
@@ -4006,6 +4006,11 @@ static int read_size(int *x)
default:
assert(0);
}
+ if (*x <= 0) {
+ warning(WARN_RANGE,
+ "\\s request results in non-positive point size; set to 1");
+ *x = 1;
+ }
return 1;
}
else {