From a6ba273e36f9c91119198284a04a09f75cb74626 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Fri, 5 Feb 2010 10:18:39 +0100 Subject: [PATCH] metadata: append_sorted should really append sorted ... which means that identical offset_orig should preserve the order in which they are appended. --- ext/metadata/metadatatypes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/metadata/metadatatypes.c b/ext/metadata/metadatatypes.c index d4625662fc..16a72e07f9 100644 --- a/ext/metadata/metadatatypes.c +++ b/ext/metadata/metadatatypes.c @@ -178,7 +178,7 @@ metadata_chunk_array_append_sorted (MetadataChunkArray * array, } pos = array->len; for (i = array->len - 1; i >= 0; --i) { - if (chunk->offset_orig > array->chunk[i].offset_orig) { + if (chunk->offset_orig >= array->chunk[i].offset_orig) { break; } }