From 04eecaac4aa6e8c39bf19bc46de5049f97c1bad5 Mon Sep 17 00:00:00 2001 From: ntfreak Date: Wed, 4 Jun 2008 09:46:19 +0000 Subject: [PATCH] - fix jlink accessing incorrect buffer element git-svn-id: svn://svn.berlios.de/openocd/trunk@701 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/jtag/jlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jtag/jlink.c b/src/jtag/jlink.c index 943cfdc3..96e4efd3 100644 --- a/src/jtag/jlink.c +++ b/src/jtag/jlink.c @@ -821,7 +821,7 @@ int jlink_usb_message(jlink_jtag_t *jlink_jtag, int out_length, int in_length) else { /* Check the result itself */ - if (0 == usb_in_buffer[result]) + if (0 == usb_in_buffer[result-1]) { return result-1; } -- 2.39.5