Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/renderer/Shader.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ public Shader(String filepath) {

// Find the first pattern after #type 'pattern'
int index = source.indexOf("#type") + 6;
int eol = source.indexOf("\r\n", index);
int eol = source.indexOf(System.lineSeparator(), index);
String firstPattern = source.substring(index, eol).trim();

// Find the second pattern after #type 'pattern'
index = source.indexOf("#type", eol) + 6;
eol = source.indexOf("\r\n", index);
eol = source.indexOf(System.lineSeparator(), index);
String secondPattern = source.substring(index, eol).trim();

if (firstPattern.equals("vertex")) {
Expand Down