Debugger: Fix warning in GDB stub
Jeffrey Pfau jeffrey@endrift.com
Thu, 15 Sep 2016 09:37:21 -0700
1 files changed,
5 insertions(+),
5 deletions(-)
jump to
M
src/debugger/gdb-stub.c
→
src/debugger/gdb-stub.c
@@ -400,15 +400,15 @@ size_t len;
if (end && end < terminator) { len = end - message; } else { - len = end - terminator; + len = terminator - message; } - if (!strncmp(message, "swbreak+", 8)) { + if (!strncmp(message, "swbreak+", len)) { stub->supportsSwbreak = true; - } else if (!strncmp(message, "hwbreak+", 8)) { + } else if (!strncmp(message, "hwbreak+", len)) { stub->supportsHwbreak = true; - } else if (!strncmp(message, "swbreak-", 8)) { + } else if (!strncmp(message, "swbreak-", len)) { stub->supportsSwbreak = false; - } else if (!strncmp(message, "hwbreak-", 8)) { + } else if (!strncmp(message, "hwbreak-", len)) { stub->supportsHwbreak = false; } if (!end) {