From 08a6282be23bbb94ee3abb7d97db7b457b06b16b Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Thu, 1 Aug 2002 07:33:36 +0000 Subject: [PATCH] fix bug in seektable sorter where it was returning the wrong value --- src/libFLAC/format.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libFLAC/format.c b/src/libFLAC/format.c index 9c3a83b..ecf4127 100644 --- a/src/libFLAC/format.c +++ b/src/libFLAC/format.c @@ -185,10 +185,10 @@ unsigned FLAC__format_seektable_sort(FLAC__StreamMetadata_SeekTable *seek_table) seek_table->points[j++] = seek_table->points[i]; } - for(; j < seek_table->num_points; j++) { - seek_table->points[j].sample_number = FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER; - seek_table->points[j].stream_offset = 0; - seek_table->points[j].frame_samples = 0; + for(i = j; i < seek_table->num_points; i++) { + seek_table->points[i].sample_number = FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER; + seek_table->points[i].stream_offset = 0; + seek_table->points[i].frame_samples = 0; } return j; -- 2.7.4