iwinfo: cli: fix hwmode formatting
authorDavid Bauer <mail@david-bauer.net>
Tue, 20 Apr 2021 00:22:38 +0000 (02:22 +0200)
committerDavid Bauer <mail@david-bauer.net>
Tue, 20 Apr 2021 16:04:31 +0000 (18:04 +0200)
The placeholder for the 802.11ax hwmode was missing.

Signed-off-by: David Bauer <mail@david-bauer.net>
iwinfo_cli.c

index ee5a0e2dde428481dedf9ca16cfb23598bc7819c..82b409c0fcf699e7bd0107f59ff849c26d8081b4 100644 (file)
@@ -274,12 +274,12 @@ static char * format_encryption(struct iwinfo_crypto_entry *c)
 
 static char * format_hwmodes(int modes)
 {
-       static char buf[15];
+       static char buf[17];
 
        if (modes <= 0)
                snprintf(buf, sizeof(buf), "unknown");
        else
-               snprintf(buf, sizeof(buf), "802.11%s%s%s%s%s%s",
+               snprintf(buf, sizeof(buf), "802.11%s%s%s%s%s%s%s",
                        (modes & IWINFO_80211_A) ? "a" : "",
                        (modes & IWINFO_80211_B) ? "b" : "",
                        (modes & IWINFO_80211_G) ? "g" : "",