Skip to content

Commit

Permalink
fix #2565 by inverting the grb2hsv argcheck condition (#3076)
Browse files Browse the repository at this point in the history
  • Loading branch information
Firenox89 committed Apr 26, 2020
1 parent 3c3bec9 commit e627249
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/modules/color_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ static int cu_grb2hsv(lua_State *L) {
const int r = luaL_checkint(L, 2);
const int b = luaL_checkint(L, 3);

luaL_argcheck(L, g == r && g == b, 1, "greyscale value cannot be converted to hsv");
luaL_argcheck(L, g != r || g != b, 1, "greyscale value cannot be converted to hsv");

uint32_t hsv = grb2hsv(g, r, b);

Expand Down

0 comments on commit e627249

Please sign in to comment.