Fixed "potentially uninitalized local variable" error when building with msvc, The code does appear to assume that variables on the stack are zero'd.

This commit is contained in:
smf- 2012-05-03 15:28:54 +00:00
parent 36ea482ace
commit 6686c410f3

View File

@ -1464,6 +1464,7 @@ FLAC__bool read_metadata_(FLAC__StreamDecoder *decoder)
block.is_last = is_last;
block.type = (FLAC__MetadataType)type;
block.length = length;
memset(&block.data, 0, sizeof(block.data));
if(type == FLAC__METADATA_TYPE_APPLICATION) {
if(!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, block.data.application.id, FLAC__STREAM_METADATA_APPLICATION_ID_LEN/8))