From f46c888e9b6763c0a200b408bb1f18bb0ccc61b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Sun, 31 Dec 2023 23:30:13 +0100 Subject: [PATCH] Fix shader loading check for empty streams --- src/SFML/Graphics/Shader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SFML/Graphics/Shader.cpp b/src/SFML/Graphics/Shader.cpp index b7bf47cc9..abf3b7170 100644 --- a/src/SFML/Graphics/Shader.cpp +++ b/src/SFML/Graphics/Shader.cpp @@ -100,7 +100,7 @@ bool getFileContents(const std::filesystem::path& filename, std::vector& b // Read the contents of a stream into an array of char bool getStreamContents(sf::InputStream& stream, std::vector& buffer) { - bool success = true; + bool success = false; const std::int64_t size = stream.getSize(); if (size > 0) {