Here you are fetching the content of the ep, before the expression setting it has been evaluated. Try this:
```
if (palette_color_list -> eval(ep) != ES_NORMAL ||
    ep . isempty() ||
    !ep . copyasstringref(&t_input) ||
    !MCImageParseColourList(*t_input, t_count, t_colors))
```