From 8d1d320d691c11fc37ef259c4e6b93857ed13eb6 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 16 Aug 2009 21:41:27 +0100 Subject: [PATCH] Cope with display which doesn't have a commod pixel-exactly at the top --- yarrg/structure.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/yarrg/structure.c b/yarrg/structure.c index f10addc..99042d0 100644 --- a/yarrg/structure.c +++ b/yarrg/structure.c @@ -313,12 +313,16 @@ void find_structure(const CanonImage *im, #define CHECK_STRIP_BORDER(tlbr,xy,increm) \ do { \ - Point csb_p; \ + Point csb_p, csb_p2; \ Rect csb_r; \ csb_p= s.mr.tl; \ csb_p.x++; csb_p.y++; \ + csb_p2= csb_p; \ + csb_p2.x++; csb_p2.y++; \ csb_p.xy= s.mr.tlbr.xy; \ - if (get_p(csb_p)=='+') { \ + csb_p2.xy= s.mr.tlbr.xy; \ + if (get_p(csb_p)=='+' && \ + get_p(csb_p2)=='+') { \ csb_r= s.mr; \ csb_r.tl.xy= csb_p.xy; \ csb_r.br.xy= csb_p.xy; \ -- 2.30.2