From 7f57c427d26d8b0c63feac5d0e7b8249707913eb Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 26 Mar 2020 16:11:56 +0100 Subject: Stack overflow fix --- src/ft_select_get.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ft_select_get.c') diff --git a/src/ft_select_get.c b/src/ft_select_get.c index 143dc09..88507a3 100644 --- a/src/ft_select_get.c +++ b/src/ft_select_get.c @@ -33,10 +33,10 @@ static int8_t return (-1); else if (ret == 5 && (clist->mlist.sprite_path[0][0])) return (-1); - else if (ret == 6 && ((clist->f_rgb.r != -1) || (clist->f_rgb.g != -1) + if (ret == 6 && ((clist->f_rgb.r != -1) || (clist->f_rgb.g != -1) || (clist->f_rgb.b != -1))) return (-1); - else if (ret == 7 && ((clist->c_rgb.r != -1) || (clist->c_rgb.g != -1) + if (ret == 7 && ((clist->c_rgb.r != -1) || (clist->c_rgb.g != -1) || (clist->c_rgb.b != -1))) return (-1); return (ret); -- cgit v1.2.3 From fe1ebcad396caed49253df48ad87ccd9261246bf Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 26 Mar 2020 16:26:01 +0100 Subject: Better parse --- src/ft_select_get.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ft_select_get.c') diff --git a/src/ft_select_get.c b/src/ft_select_get.c index 88507a3..a2bd257 100644 --- a/src/ft_select_get.c +++ b/src/ft_select_get.c @@ -33,11 +33,11 @@ static int8_t return (-1); else if (ret == 5 && (clist->mlist.sprite_path[0][0])) return (-1); - if (ret == 6 && ((clist->f_rgb.r != -1) || (clist->f_rgb.g != -1) - || (clist->f_rgb.b != -1))) + if (ret == 6 && (((clist->f_rgb.r != -1) || (clist->f_rgb.g != -1) + || (clist->f_rgb.b != -1)) || clist->mlist.fl_tex_path[0])) return (-1); - if (ret == 7 && ((clist->c_rgb.r != -1) || (clist->c_rgb.g != -1) - || (clist->c_rgb.b != -1))) + if (ret == 7 && (((clist->c_rgb.r != -1) || (clist->c_rgb.g != -1) + || (clist->c_rgb.b != -1)) || clist->mlist.ce_tex_path[0])) return (-1); return (ret); } -- cgit v1.2.3