38 lines
1.5 KiB
Diff
38 lines
1.5 KiB
Diff
From 874b610463a8de0f708b06a5c7feb8f370579a42 Mon Sep 17 00:00:00 2001
|
|
From: ptitSeb <sebastien.chev@gmail.com>
|
|
Date: Wed, 16 Mar 2022 14:31:08 +0100
|
|
Subject: [PATCH 190/233] [GLES2] Fixed a bug in preproc parser, fixing shader
|
|
conversion that contained a version marquer (shoudl help #366 and other)
|
|
|
|
---
|
|
src/gl/preproc.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/src/gl/preproc.c b/src/gl/preproc.c
|
|
index 582f2186..b73cd57c 100644
|
|
--- a/src/gl/preproc.c
|
|
+++ b/src/gl/preproc.c
|
|
@@ -758,6 +758,9 @@ char* preproc(const char* code, int keepcomments, int gl_es, extensions_t* exts,
|
|
char buff[20] = {0};
|
|
sprintf(buff, "%g", tok.real);
|
|
strncat(*versionString, buff, 50);
|
|
+ } else if(tok.type==TK_NEWLINE) {
|
|
+ oldp = NULL;
|
|
+ status = 0;
|
|
} else {
|
|
status = 399; // fallback, syntax error...
|
|
}
|
|
@@ -778,6 +781,9 @@ char* preproc(const char* code, int keepcomments, int gl_es, extensions_t* exts,
|
|
sprintf(buff, "%g", tok.real);
|
|
strncat(*versionString, buff, 50);
|
|
status = 820;
|
|
+ } else if(tok.type==TK_NEWLINE) {
|
|
+ oldp = NULL;
|
|
+ status = 0;
|
|
} else {
|
|
status = 399; // fallback, syntax error...
|
|
}
|
|
--
|
|
2.11.0
|
|
|