[Bf-blender-cvs] [bb3a5388439] master: Fix: Incorrect coordinates used in BLI_rct*_isect_segment functions

Siddhartha Jejurkar noreply at git.blender.org
Tue Jul 12 11:31:48 CEST 2022


Commit: bb3a53884394908ba34459c38d419e6c4abe6107
Author: Siddhartha Jejurkar
Date:   Tue Jul 12 19:27:48 2022 +1000
Branches: master
https://developer.blender.org/rBbb3a53884394908ba34459c38d419e6c4abe6107

Fix: Incorrect coordinates used in BLI_rct*_isect_segment functions

Ref D15330.

===================================================================

M	source/blender/blenlib/intern/rct.c

===================================================================

diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c
index 0bb606c288e..7248db5b718 100644
--- a/source/blender/blenlib/intern/rct.c
+++ b/source/blender/blenlib/intern/rct.c
@@ -265,7 +265,7 @@ bool BLI_rcti_isect_segment(const rcti *rect, const int s1[2], const int s2[2])
   /* diagonal: [/] */
   tvec1[0] = rect->xmin;
   tvec1[1] = rect->ymin;
-  tvec2[0] = rect->xmin;
+  tvec2[0] = rect->xmax;
   tvec2[1] = rect->ymax;
   if (isect_segments_i(s1, s2, tvec1, tvec2)) {
     return true;
@@ -311,7 +311,7 @@ bool BLI_rctf_isect_segment(const rctf *rect, const float s1[2], const float s2[
   /* diagonal: [/] */
   tvec1[0] = rect->xmin;
   tvec1[1] = rect->ymin;
-  tvec2[0] = rect->xmin;
+  tvec2[0] = rect->xmax;
   tvec2[1] = rect->ymax;
   if (isect_segments_fl(s1, s2, tvec1, tvec2)) {
     return true;



More information about the Bf-blender-cvs mailing list