Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions render/src/shape_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,17 @@ impl PendingPath {
other.points.extend_from_slice(&new_segment.points[1..]);
new_segment = self.segments.swap_remove(i);
start_open = false;
// Restart from the beginning; the merged segment may now connect
// to a segment at an earlier index for the end match.
i = 0;
} else if end_open && new_segment.end() == other.start() {
std::mem::swap(&mut other.points, &mut new_segment.points);
other.points.extend_from_slice(&new_segment.points[1..]);
new_segment = self.segments.swap_remove(i);
end_open = false;
// Restart from the beginning; the merged segment may now connect
// to a segment at an earlier index for the start match.
i = 0;
} else {
i += 1;
}
Expand Down Expand Up @@ -542,6 +548,10 @@ impl<'a> ShapeConverter<'a> {
for (i, path) in self.fills.iter_mut().enumerate() {
// These invariants are checked above (any invalid/empty fill ID should not have been added).
debug_assert!(i < self.fill_styles.len());

// Fills must be closed loops. Flash ignores any unclosed fill paths.
path.segments.retain(PathSegment::is_closed);

if path.segments.is_empty() {
continue;
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Binary file added tests/tests/swfs/avm1/issue_5614/test.swf
Binary file not shown.
4 changes: 4 additions & 0 deletions tests/tests/swfs/avm1/issue_5614/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
num_frames = 1

[player_options]
with_renderer = { optional = false, quality = "low" }
Loading