Diff between add3e20aceeffc19819a455a7c1af2d7e41138f4 and 877dbcdb0bf125696c0753158906ab71d53b9e3f

Changed Files

File Additions Deletions Status
monitor/packet.c +7 -1 modified

Full Patch

diff --git a/monitor/packet.c b/monitor/packet.c
index 473ab8d..69383ce 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -69,6 +69,7 @@
 
 #define COLOR_UNKNOWN_ERROR		COLOR_WHITE_BG
 #define COLOR_UNKNOWN_FEATURE_BIT	COLOR_WHITE_BG
+#define COLOR_UNKNOWN_COMMAND_BIT	COLOR_WHITE_BG
 #define COLOR_UNKNOWN_EVENT_MASK	COLOR_WHITE_BG
 #define COLOR_UNKNOWN_LE_STATES		COLOR_WHITE_BG
 #define COLOR_UNKNOWN_SERVICE_CLASS	COLOR_WHITE_BG
@@ -2083,7 +2084,12 @@ static void print_commands(const uint8_t *commands)
 				continue;
 
 			cmd = get_supported_command((i * 8) + n);
-			print_field("  %s (Octet %d - Bit %d)", cmd, i, n);
+			if (cmd)
+				print_field("  %s (Octet %d - Bit %d)",
+								cmd, i, n);
+			else
+				print_text(COLOR_UNKNOWN_COMMAND_BIT,
+						"  Octet %d - Bit %d ", i, n);
 		}
 	}
 }