Fix error line searching for HLSL compiled with debug info. (#1414)

This commit is contained in:
divinon
2018-06-18 21:51:32 +02:00
committed by Branimir Karadžić
parent f310352f11
commit 218c9e5ea1

View File

@@ -624,8 +624,17 @@ namespace bgfx { namespace hlsl
int32_t start = 0;
int32_t end = INT32_MAX;
if (!hlslfp.empty())
{
const char* logfp = bx::strFind(log, hlslfp.c_str());
if (NULL != logfp)
{
log = logfp + hlslfp.length();
}
}
bool found = false
|| 2 == sscanf(log, "(%u,%u):", &line, &column)
|| 2 == sscanf(log, "(%u,%u", &line, &column)
|| 2 == sscanf(log, " :%u:%u: ", &line, &column)
;