summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2016-07-11 14:44:47 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2016-07-11 14:44:47 +0200
commit9ec15f5120dfdf762c759d9d54d4586c6f88905d (patch)
treed050117ef6e6d13db6c23567f0ff21ca617ad65c
parent6dc338458113252ed59a991ba8c11f38ae3f3ba4 (diff)
downloadlibufodecode-9ec15f5120dfdf762c759d9d54d4586c6f88905d.tar.gz
libufodecode-9ec15f5120dfdf762c759d9d54d4586c6f88905d.tar.bz2
libufodecode-9ec15f5120dfdf762c759d9d54d4586c6f88905d.tar.xz
libufodecode-9ec15f5120dfdf762c759d9d54d4586c6f88905d.zip
Shift data writes by start offset
-rw-r--r--src/ufodecode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ufodecode.c b/src/ufodecode.c
index 23a6018..6a90a54 100644
--- a/src/ufodecode.c
+++ b/src/ufodecode.c
@@ -241,7 +241,7 @@ ufo_decode_frame_channels_v6 (UfoDecoder *decoder, uint16_t *pixel_buffer, uint3
#endif
while ((raw[base] != 0xAAAAAAA) && ((num_bytes - base * 4) >= 32)) {
- const size_t row_number = raw[base] & 0xfff;
+ const size_t row_number = (raw[base] & 0xfff) - start_offset;
const size_t pixel_number = (raw[base + 1] >> 16) & 0xfff;
base += 2;