From: ntfreak Date: Wed, 4 Jun 2008 09:46:19 +0000 (+0000) Subject: - fix jlink accessing incorrect buffer element X-Git-Tag: v0.1.0~588 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=04eecaac4aa6e8c39bf19bc46de5049f97c1bad5;p=openocd - fix jlink accessing incorrect buffer element git-svn-id: svn://svn.berlios.de/openocd/trunk@701 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- 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; }