mirror of
https://github.com/IllusionMan1212/tinyvg-odin.git
synced 2026-10-23 18:12:38 +00:00
fix: change ArcCircleInstruction radius from Point to Unit; assertion for safety
This commit is contained in:
+2
-1
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user