From faba74f016aaf70e27e62ace5affb1f8a223b526 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 12 Oct 2009 16:16:25 +0000 Subject: [PATCH] reading hist always stopped after the first line --- ChangeLog | 1 + libvips/iofuncs/im_open_vips.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8fbc55aa..0140cae7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -58,6 +58,7 @@ (thanks Christoph) - im_generate() checks that im_demand_hint() has been called for this image - im_jpeg2vips.c, set scale_num on shrink (thanks Guido) +- heh argh reading history always stopped after the first line (thanks Haida) 25/3/09 started 7.18.0 - revised version numbers diff --git a/libvips/iofuncs/im_open_vips.c b/libvips/iofuncs/im_open_vips.c index 2889d9b9..e8e65d57 100644 --- a/libvips/iofuncs/im_open_vips.c +++ b/libvips/iofuncs/im_open_vips.c @@ -7,6 +7,8 @@ * - block mmaps of nodata images * 12/5/09 * - fix signed/unsigned warnings + * 12/10/09 + * - heh argh reading history always stopped after the first line */ /* @@ -689,8 +691,10 @@ set_history( IMAGE *im, char *history ) history_list = NULL; for( p = history; *p; p = q ) { - if( (q = strchr( p, '\n' )) ) + if( (q = strchr( p, '\n' )) ) { *q = '\0'; + q += 1; + } else q = p + strlen( p );