sys/fmt_table: fix infinite loop
This commit is contained in:
parent
b35e4f4a95
commit
00a8a8bd83
@ -25,6 +25,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "fmt.h"
|
#include "fmt.h"
|
||||||
|
#include "fmt_table.h"
|
||||||
|
|
||||||
static const char fmt_table_spaces[16] = " ";
|
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) {
|
while (fill_size > pat_size) {
|
||||||
print(pat, pat_size);
|
print(pat, pat_size);
|
||||||
|
fill_size -= pat_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
print(pat, fill_size);
|
print(pat, fill_size);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user