From: Arran Cudbard-Bell Date: Tue, 17 Mar 2020 04:03:39 +0000 (-0400) Subject: unit_test_attribute: Only consider '-' special if it's at the end of a line X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e7c63f104cd5d1567876275bb4528efeeec756b;p=thirdparty%2Ffreeradius-server.git unit_test_attribute: Only consider '-' special if it's at the end of a line --- diff --git a/src/bin/unit_test_attribute.c b/src/bin/unit_test_attribute.c index 31794f57659..5cbf7d36eb1 100644 --- a/src/bin/unit_test_attribute.c +++ b/src/bin/unit_test_attribute.c @@ -2092,7 +2092,7 @@ size_t process_line(command_result_t *result, command_ctx_t *cc, char *data, siz /* * Feed the data buffer in as the command */ - if (*p == '-') { + if ((p[0] == '-') && ((p[1] == ' ') || (p[1] == '\0'))) { data_used = command->func(result, cc, data, data_used, data, data_used); } else {