1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #15823 from maribu/fmt-table-bugfix

sys/fmt_table: fix infinite loop
This commit is contained in:
Marian Buschsieweke 2021-01-21 13:15:52 +01:00 committed by GitHub
commit 90700f1cec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,7 @@
#include <string.h>
#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);