changeset 3834:3a03da46d884 HEAD

Crashfix to last keyword compare update
author Timo Sirainen <tss@iki.fi>
date Sat, 07 Jan 2006 02:17:52 +0200
parents 318c70c1d4ec
children 309605c0a7fb
files src/lib-storage/index/index-sync.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/index-sync.c	Sat Jan 07 01:48:57 2006 +0200
+++ b/src/lib-storage/index/index-sync.c	Sat Jan 07 02:17:52 2006 +0200
@@ -276,6 +276,11 @@
 	const unsigned int *idx1, *idx2;
 	unsigned int i, j, count1, count2;
 
+	if (!array_is_created(k1))
+		return !array_is_created(k2) || array_count(k2) == 0;
+	if (!array_is_created(k2))
+		return FALSE;
+
 	/* The arrays may not be sorted, but they usually are. Optimize for
 	   the assumption that they are */
 	idx1 = array_get(k1, &count1);