From: Alan T. DeKok Date: Fri, 13 Aug 2021 15:15:16 +0000 (-0400) Subject: print offsets for large numbers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca3fb85aa2ee34b140bd68da59fab456b50caf66;p=thirdparty%2Ffreeradius-server.git print offsets for large numbers because fonts can only go so small --- diff --git a/src/bin/unit_test_attribute.c b/src/bin/unit_test_attribute.c index 733c53b2ab3..1361a3364b0 100644 --- a/src/bin/unit_test_attribute.c +++ b/src/bin/unit_test_attribute.c @@ -339,7 +339,11 @@ static void mismatch_print(command_file_ctx_t *cc, char const *command, spaces = talloc_zero_array(NULL, char, (e - expected) + 1); memset(spaces, ' ', talloc_array_length(spaces) - 1); - ERROR(" %s^ differs here", spaces); + if ((e - expected) < 128) { + ERROR(" %s^ differs here", spaces); + } else { + ERROR(" %s^ differs here (%zu)", spaces, e - expected); + } talloc_free(spaces); } }