hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/platform/opengl/opengl_shader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform/opengl/opengl_shader.cpp')
-rw-r--r--src/platform/opengl/opengl_shader.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/platform/opengl/opengl_shader.cpp b/src/platform/opengl/opengl_shader.cpp
index e2e6279..39e582a 100644
--- a/src/platform/opengl/opengl_shader.cpp
+++ b/src/platform/opengl/opengl_shader.cpp
@@ -65,7 +65,8 @@ namespace Donut
const char* type_token = "#type";
size_t type_token_length = strlen(type_token);
size_t pos = source.find(type_token, 0);
- while (pos != std::string::npos) {
+ while (pos != std::string::npos)
+ {
size_t eol = source.find_first_of("\r\n", pos);
size_t begin = pos + type_token_length + 1;
std::string type = source.substr(begin, eol - begin);