From 57811e40f0dac5d357267837f4b18d16943bf4e1 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 7 Apr 2021 15:26:16 +1000 Subject: [PATCH] tools/record: fix a strlen assumption We want to be able to print single-character strings. Signed-off-by: Peter Hutterer --- tools/libinput-record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libinput-record.c b/tools/libinput-record.c index f04d5cde..3ad593fc 100644 --- a/tools/libinput-record.c +++ b/tools/libinput-record.c @@ -180,7 +180,7 @@ iprintf(FILE *fp, int rc; assert(indent < len); - assert(strlen(format) > 1); + assert(strlen(format) >= 1); /* Special case: if we're printing a new list item, we want less * indentation because the '- ' takes up one level of indentation