mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-22 00:01:09 -06:00
Bugfix: the Y coordinate of Point config fields was not correctly validated and lead to a crash when entering non-numeric values. Includes regression test. #1906
This commit is contained in:
parent
f308a46cd5
commit
b68c55fec0
2 changed files with 5 additions and 3 deletions
|
@ -207,7 +207,7 @@ Pointf::from_SV(SV* point_sv)
|
|||
AV* point_av = (AV*)SvRV(point_sv);
|
||||
SV* sv_x = *av_fetch(point_av, 0, 0);
|
||||
SV* sv_y = *av_fetch(point_av, 1, 0);
|
||||
if (!looks_like_number(sv_x) || !looks_like_number(sv_x)) return false;
|
||||
if (!looks_like_number(sv_x) || !looks_like_number(sv_y)) return false;
|
||||
|
||||
this->x = SvNV(sv_x);
|
||||
this->y = SvNV(sv_y);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue