Bläddra i källkod

fix #2565 by inverting the grb2hsv argcheck condition (#3076)

firenox89 4 år sedan
förälder
incheckning
fd26dea949
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      app/modules/color_utils.c

+ 1 - 1
app/modules/color_utils.c

@@ -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);