On Tue, Oct 21, 2003 at 07:17:22PM +0200, Andre Poenitz spake thusly: > > - if (point == last || chunkwidth >= width - left) > - point = (pos < i) ? i - 1 : i; > - break; > + if (point == last || chunkwidth >= width - left) { > + if (pos < i) { > + point = i - 1; > + break; > + } > + } > > No good. > > Andre'
Grmpf indeed. Your patch is close but I think you need the following: if (point == last || chunkwidth >= width - left) { if (pos < i) { point = i - 1; - break; <-- *don't* delete this } } + if (i + 1 < last) <-- needed to prevent trailing empty row creation after wide inset + break; <-- OK. This works perfectly on the file José sent me. - Martin
pgp00000.pgp
Description: PGP signature