1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-19 11:44:48 +00:00

fixed rgb color passing

This commit is contained in:
Zeno Rogue 2024-05-27 12:31:49 +02:00
parent f823a53f84
commit e6417951de

View File

@ -557,10 +557,10 @@ color_t exp_parser::parsecolor(int prio) {
}
if(eat("rgb(")) {
array<ld, 4> parts;
parts[0] = rparse(); force_eat(",");
parts[1] = rparse(); force_eat(",");
parts[2] = rparse();
if(eat(",")) parts[3] = rparse(); else parts[3] = 1;
parts[3] = rparse(); force_eat(",");
parts[2] = rparse(); force_eat(",");
parts[1] = rparse();
if(eat(",")) parts[0] = rparse(); else parts[0] = 1;
force_eat(")");
return part_to_col(parts);
}