utils.c: Make print_image actually cope with negative strides
authorSøren Sandmann Pedersen <ssp@redhat.com>
Fri, 20 Sep 2013 06:45:32 +0000 (02:45 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Thu, 26 Sep 2013 17:35:29 +0000 (13:35 -0400)
commitff682089ce1128079c06827a80647fa3284ca2a2
tree6b1cbbc1a3b1473a024310df8c3678ca6eaf7998
parentec0e38cbb746a673f8e989ab8eae356c8c77dac7
utils.c: Make print_image actually cope with negative strides

Commit 4312f077365bf9f59423b1694136089c6da6216b claimed to have made
print_image() work with negative strides, but it didn't actually
work. When the stride was negative, the image buffer would be accessed
as if the stride were positive.

Fix the bug by not changing the stride variable and instead using a
temporary, s, that contains the absolute value of stride.
test/utils.c