Skip to content

Commit

Permalink
fix: duplicate() segfaults in release builds. Fixes #42
Browse files Browse the repository at this point in the history
  • Loading branch information
Xananax committed Dec 29, 2021
1 parent 72ca58d commit 3a78bd5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion game_demos/DrawingTurtle.gd
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,7 @@ class Polygon:
return (rect.position + rect.end) / 2.0 + position

func get_points() -> Array:
return points.duplicate()
var copy := []
for point in points:
copy.push_back(point)
return copy

0 comments on commit 3a78bd5

Please sign in to comment.