changeset 986:533694a9675c

Fix another missing separator bug in image overlay. This one was occuring with default string when no ISO data was available from exif.
author zas_
date Sat, 23 Aug 2008 21:07:25 +0000
parents 8cef771ff0fb
children 9c75ab848cd4
files src/image-overlay.c
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/image-overlay.c	Sat Aug 23 20:46:31 2008 +0000
+++ b/src/image-overlay.c	Sat Aug 23 21:07:25 2008 +0000
@@ -371,22 +371,23 @@
 				/* insert separator */
 				g_string_insert(new, pos, sep);
 				pos += strlen(sep);
+				want_separator = FALSE;
 				}
 
 			g_string_insert(new, pos, data);
 			pos += strlen(data);
 		}
 
-		want_separator = FALSE;
-
 		if (pos-prev >= 1 && new->str[pos] == imp)
 			{
 			/* pipe character is replaced by a separator, delete it
 			 * and raise a flag if needed */
 			g_string_erase(new, pos--, 1);
-			want_separator = (data && *data);
+			want_separator |= (data && *data);
 			}
-		
+
+		if (new->str[pos] == '\n') want_separator = FALSE;
+
 		prev = pos - 1;
 
 		g_free(name);