Skip to content

Range based for-loop crashes with "Chunk size outside of range" #4

@feliwir

Description

@feliwir

Hey, i use this library to read .ANI cursor files (https://www.daubnet.com/en/file-format-ani)

However when using a range-based for loop like this:

riffcpp::Chunk chunk(file_buffer, size);

std::vector<char> cursor_data;

for(auto subchunk : chunk)
{
	if (subchunk.type() == fram_id)
	{
		cursor_data.resize(subchunk.size());
		subchunk.read_data(cursor_data.data(), cursor_data.size());
	}
}

The library will just crash inside the for-loop. Are there other ways to iterate chunks?
See the screenshot attached for the error:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions