Skip to content

Commit 474f4bd

Browse files
committed
emcmodule: correct swapped arguments and pointer errors in pyvertex9
pt (3 elements) and pt1 (9 elements) were passed in reverse order to vertex9. Py_BuildValue was also incorrectly passed pointers instead of values, causing pointer addresses to be returned to Python instead of actual coordinates. This would have caused incorrect coordinates in the Axis backplot.
1 parent 49c8bf1 commit 474f4bd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/emc/usr_intf/axis/extensions/emcmodule.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2020,8 +2020,8 @@ static PyObject *pyvertex9(PyObject * /*s*/, PyObject *o) {
20202020
&pt1[6], &pt1[7], &pt1[8]))
20212021
return NULL;
20222022

2023-
vertex9(pt, pt1, geometry);
2024-
return Py_BuildValue("(ddd)", &pt[0], &pt[1], &pt[2]);
2023+
vertex9(pt1, pt, geometry);
2024+
return Py_BuildValue("(ddd)", pt[0], pt[1], pt[2]);
20252025
}
20262026

20272027
static PyObject *pygui_respect_offsets (PyObject * /*s*/, PyObject *o) {

0 commit comments

Comments
 (0)