Skip to content

Commit b31d14e

Browse files
Merge pull request livecode#7040 from livecodeian/bugfix-canvas_point_equal
[[ Bug 22060 ]] Stop point values with matching hashes from overwriting each other.
2 parents 028f80b + 39a327d commit b31d14e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/lcb/notes/22060.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# [22060] Fix bug in canvas library that can result in Points being initialized with previously used values.

engine/src/module-canvas.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ static bool __MCCanvasPointEqual(MCValueRef p_left, MCValueRef p_right)
843843
if (p_left == p_right)
844844
return true;
845845

846-
return MCMemoryCompare(MCValueGetExtraBytesPtr(p_left), MCValueGetExtraBytesPtr(p_left), sizeof(__MCCanvasPointImpl)) == 0;
846+
return MCMemoryCompare(MCValueGetExtraBytesPtr(p_left), MCValueGetExtraBytesPtr(p_right), sizeof(__MCCanvasPointImpl)) == 0;
847847
}
848848

849849
static hash_t __MCCanvasPointHash(MCValueRef p_value)

0 commit comments

Comments
 (0)