]> git.sur5r.net Git - openocd/commitdiff
contrib: itmdump: fix multi byte decoding
authorKarl Palsson <karlp@remake.is>
Fri, 19 Dec 2014 14:17:52 +0000 (14:17 +0000)
committerSpencer Oliver <spen@spen-soft.co.uk>
Thu, 15 Jan 2015 23:23:28 +0000 (23:23 +0000)
Incorrect byte manipulations.

Change-Id: Id8c3f457b39f4b2b75613076d403359c4972a69d
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2448
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
contrib/itmdump.c

index 1c484d0a4858f822dfac3f8508a929bb2d48153f..9d313ffbfe297d1d3901da11d989bb680d957f82 100644 (file)
@@ -130,7 +130,7 @@ static bool read_varlen(FILE *f, int c, unsigned *value)
 
        *value =  (buf[3] << 24)
                + (buf[2] << 16)
-               + (buf[2] << 8)
+               + (buf[1] << 8)
                + (buf[0] << 0);
        return true;