diff --git a/tinyvg.odin b/tinyvg.odin index 263131c..b958480 100644 --- a/tinyvg.odin +++ b/tinyvg.odin @@ -127,7 +127,7 @@ CubicBezierInstruction :: struct { ArcCircleInstruction :: struct { large_arc: bool, sweep: bool, - radius: Point, + radius: Unit, target: Point, } ArcEllipseInstruction :: struct { @@ -581,6 +581,7 @@ read_unit :: proc(r: ^Reader, header: Header) -> (unit: f32, err: Error) { @(private, require_results) read_path :: proc(r: ^Reader, header: Header, segment_count: u32) -> (path: Path, err: Error) { + assert(segment_count <= 1024) // arbitrary limit to avoid unbounded allocations on malformed input segments_instructions: [1024]u32 segments := make([]Segment, segment_count)