]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
print offsets for large numbers
authorAlan T. DeKok <aland@freeradius.org>
Fri, 13 Aug 2021 15:15:16 +0000 (11:15 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 13 Aug 2021 17:53:27 +0000 (13:53 -0400)
because fonts can only go so small

src/bin/unit_test_attribute.c

index 733c53b2ab3459354a15c69cf57fe74a4af1574b..1361a3364b0c02c74908f9b7e8d2adb16880ac2b 100644 (file)
@@ -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);
        }
 }