all repos — mgba @ d618bf8d7b74ff4d89d16c74d5696b9bf94c76fd

mGBA Game Boy Advance Emulator

Debugger: Fix warning in GDB stub
Jeffrey Pfau jeffrey@endrift.com
Thu, 15 Sep 2016 09:37:21 -0700
commit

d618bf8d7b74ff4d89d16c74d5696b9bf94c76fd

parent

a4907ba321f4a8d87f3cfc9280250410fba2c7ae

1 files changed, 5 insertions(+), 5 deletions(-)

jump to
M src/debugger/gdb-stub.csrc/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) {