-
-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File doesn't exist @ dxCreateShader; When using long-string as raw-data in certain ways #3825
Comments
if (!bValidFilePath || (strFile[0] != '@' && strFile[0] != ':'))
{
bIsRawData = strFile.find("\n") != std::string::npos;
if (!bIsRawData)
{
bIsRawData = (strFile.find("technique ") != std::string::npos) && (strFile.find("pass ") != std::string::npos) &&
(strFile.find('{') != std::string::npos) && (strFile.find('}') != std::string::npos);
}
} Maybe it should not check for an end line 😆 |
That's how you check for a match from If you're referring to the I think the solution here is to remove the checks for |
Raw data can also not have new line as shown above. Thats not an ideal solution. |
Raw data can have newlines. The author says the first example works, and I've also done it myself before.
Yeah true for some reason I thought they weren't allowed. Anyway, I think it's unlikely someone tries to load a shader with filename containing What is to stop them currently having a filename called |
cant we just have it all under one if statement? bIsRawData = strFile.find("\n") != std::string::npos || (strFile.find("technique ") != std::string::npos
&& strFile.find("pass ") != std::string::npos && strFile.find('{') != std::string::npos
&& strFile.find('}') != std::string::npos); |
Sounds fine, but you'll want to remove the spaces from |
Wouldn't finding for { and } be enough to identify raw data instead of path? |
|
My bad I didn't realize file names can have {} |
Describe the bug
So this is the main script, it obviously runs:
And if you remove the unnecessary whitespaces, it will still run perfectly:
But if you remove the extra whitespaces after the word 'technique' or 'pass,' it will throw a 'file doesn't exist' error:
OR
However, if you remove every whitespace, even after 'technique' and 'pass', it can still run, if you use it in a single line like this:
This way the shader will be created again without any problem.
Steps to reproduce
Version
Client: v1.6-release-22780 (Windows 64-bit)
Server: v1.6-release-22780 (Windows 64-bit)
Additional context
My debug script results are shown here for better illustration:
Relevant log output
No response
Security Policy
The text was updated successfully, but these errors were encountered: