mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Fixed shaderc crash when $in/output lines have comments.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$input v_wpos, v_view, v_normal, v_tangent, v_bitangent, v_texcoord0
|
||||
$input v_wpos, v_view, v_normal, v_tangent, v_bitangent, v_texcoord0 // in...
|
||||
|
||||
/*
|
||||
* Copyright 2011-2013 Branimir Karadzic. All rights reserved.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1213,7 +1213,7 @@ uint32_t parseInOut(InOut& _inout, const char* _str, const char* _eol)
|
||||
_str = bx::strws(delim + 1);
|
||||
}
|
||||
}
|
||||
while (delim < _eol && NULL != delim);
|
||||
while (delim < _eol && _str < _eol && NULL != delim);
|
||||
|
||||
std::sort(_inout.begin(), _inout.end() );
|
||||
|
||||
@@ -1533,11 +1533,15 @@ int main(int _argc, const char* _argv[])
|
||||
if (0 == strncmp(str, "input", 5) )
|
||||
{
|
||||
str += 5;
|
||||
const char* comment = strstr(str, "//");
|
||||
eol = NULL != comment && comment < eol ? comment : eol;
|
||||
inputHash = parseInOut(shaderInputs, str, eol);
|
||||
}
|
||||
else if (0 == strncmp(str, "output", 6) )
|
||||
{
|
||||
str += 6;
|
||||
const char* comment = strstr(str, "//");
|
||||
eol = NULL != comment && comment < eol ? comment : eol;
|
||||
outputHash = parseInOut(shaderOutputs, str, eol);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user