clamp indent count to increment to >= 0 just in case - webdump - HTML to plain-text converter for webpages (HTM) git clone git://git.codemadness.org/webdump (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit dc7717417afb10040e4ea5d9472cc1c2658f1c8c (DIR) parent 17c9e247a8df6c43cdec6bac73410dd35ece683c (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 12 Sep 2023 19:59:33 +0200 clamp indent count to increment to >= 0 just in case Diffstat: M webdump.c | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) --- (DIR) diff --git a/webdump.c b/webdump.c @@ -634,6 +634,8 @@ rindent(void) int i, total; total = indent + defaultindent; + if (total < 0) + total = 0; for (i = 0; i < total; i++) putchar(' ');