Skip to content

Commit

Permalink
math_parser(): Fix too restrictive condition in function 'ellipse()'.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtschump committed Nov 24, 2023
1 parent ea43f3c commit 84913e1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CImg.h
Original file line number Diff line number Diff line change
Expand Up @@ -25008,10 +25008,12 @@ namespace cimg_library {
}

static double mp_ellipse(_cimg_math_parser& mp) {
mp_check_list(mp,"ellipse");
const unsigned int i_end = (unsigned int)mp.opcode[2];
unsigned int ind = (unsigned int)mp.opcode[3];
if (ind!=~0U) ind = (unsigned int)cimg::mod((int)_mp_arg(3),mp.imglist.width());
if (ind!=~0U) {
mp_check_list(mp,"ellipse");
ind = (unsigned int)cimg::mod((int)_mp_arg(3),mp.imglist.width());
}
CImg<T> &img = ind==~0U?mp.imgout:mp.imglist[ind];
CImg<T> color(img._spectrum,1,1,1,0);
bool is_invalid_arguments = false, is_outlined = false;
Expand Down

0 comments on commit 84913e1

Please sign in to comment.