Skip to content

Commit

Permalink
Merge pull request #50 from timothyschoen/master
Browse files Browse the repository at this point in the history
Fix alpha colour support in plugdata
  • Loading branch information
agraef authored Aug 27, 2024
2 parents 30ecb8a + 78d3621 commit 774a13c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdlua_gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ static int set_color(lua_State* L) {
SETFLOAT(args + 1, luaL_checknumber(L, 2)); // g
SETFLOAT(args + 2, luaL_checknumber(L, 3)); // b

if (lua_gettop(L) > 4) { // object and table are already on stack, hence 5
if (lua_gettop(L) >= 4) { // object and table are already on stack, hence 5
// alpha (optional, default to 1.0)
SETFLOAT(args + 3, luaL_checknumber(L, 4));
}
Expand Down

0 comments on commit 774a13c

Please sign in to comment.