add assert on the vendor string construction
authorJosh Coalson <jcoalson@users.sourceforce.net>
Thu, 17 Oct 2002 07:40:01 +0000 (07:40 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Thu, 17 Oct 2002 07:40:01 +0000 (07:40 +0000)
src/libFLAC/stream_encoder_framing.c

index d7bd363..7b638cf 100644 (file)
@@ -47,6 +47,7 @@ FLAC__bool FLAC__add_metadata_block(const FLAC__StreamMetadata *metadata, FLAC__
         */
        i = metadata->length;
        if(metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) {
+               FLAC__ASSERT(metadata->data.vorbis_comment.vendor_string.length == 0 || 0 != metadata->data.vorbis_comment.vendor_string.entry);
                i -= metadata->data.vorbis_comment.vendor_string.length;
                i += vendor_string_length;
        }