From 9ec15f5120dfdf762c759d9d54d4586c6f88905d Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Mon, 11 Jul 2016 14:44:47 +0200 Subject: Shift data writes by start offset --- src/ufodecode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3