From 00a8a8bd83b59642f71186eceb2bd5905093b010 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Thu, 21 Jan 2021 09:57:24 +0100 Subject: [PATCH] sys/fmt_table: fix infinite loop --- sys/fmt/table.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/fmt/table.c b/sys/fmt/table.c index dbf1bb851a..c0c0308c57 100644 --- a/sys/fmt/table.c +++ b/sys/fmt/table.c @@ -25,6 +25,7 @@ #include #include "fmt.h" +#include "fmt_table.h" static const char fmt_table_spaces[16] = " "; @@ -43,6 +44,7 @@ static void print_pattern(const char *pat, size_t pat_size, size_t fill_size) { while (fill_size > pat_size) { print(pat, pat_size); + fill_size -= pat_size; } print(pat, fill_size);