Commit e63bd2ce authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: The first shader token should be the version token.

parent 2dcfdd5b
......@@ -911,17 +911,16 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
ins.src = src_param;
This->baseShader.parse_state.current_row = 0;
if (!shader_is_version_token(*pToken++))
{
ERR("First token is not a version token, invalid shader.\n");
return;
}
while (WINED3DPS_END() != *pToken)
{
DWORD opcode_token;
/* Skip version token */
if (shader_is_version_token(*pToken))
{
++pToken;
continue;
}
/* Skip comment tokens */
if (shader_is_comment(*pToken))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment