Commit 1e81b4ea412c5a2b8a8f6b5b9f5351862625d6ff

Con Kolivas 2014-01-06T10:59:18

Minor correctness change in spi_add_data

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/libbitfury.c b/libbitfury.c
index 953a3ef..d25bef9 100644
--- a/libbitfury.c
+++ b/libbitfury.c
@@ -193,7 +193,7 @@ void spi_add_data(struct bitfury_info *info, uint16_t addr, const void *buf, int
 	}
 	len /= 4; /* Strip */
 	otmp[0] = (len - 1) | 0xE0;
-	otmp[1] = addr >> 8;
+	otmp[1] = (addr >> 8) & 0xFF;
 	otmp[2] = addr & 0xFF;
 	spi_add_buf(info, otmp, 3);
 	len *= 4;