mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Introduce proper error handling for file streams
This commit is contained in:
@@ -710,7 +710,8 @@ std::string ShadowRenderer::readShaderFile(const std::string &path)
|
||||
prefix.append("#line 0\n");
|
||||
|
||||
std::string content;
|
||||
fs::ReadFile(path, content);
|
||||
if (!fs::ReadFile(path, content, true))
|
||||
return "";
|
||||
|
||||
return prefix + content;
|
||||
}
|
||||
|
Reference in New Issue
Block a user