Fix array out of bounds bug in processing if-else-endif macros.
If we are not inside an if macro, we cannot simply decrease elsetracker. Fixes https://github.com/KhronosGroup/glslang/issues/29.
This commit is contained in:
12
Test/baseResults/preprocessor.many.endif.vert.err
Normal file
12
Test/baseResults/preprocessor.many.endif.vert.err
Normal file
@@ -0,0 +1,12 @@
|
||||
ERROR: 0:1: '#endif' : mismatched statements
|
||||
ERROR: 0:2: '#endif' : mismatched statements
|
||||
ERROR: 0:3: '#endif' : mismatched statements
|
||||
ERROR: 0:4: '#endif' : mismatched statements
|
||||
ERROR: 0:5: '#endif' : mismatched statements
|
||||
ERROR: 0:6: '#endif' : mismatched statements
|
||||
ERROR: 0:7: '#endif' : mismatched statements
|
||||
ERROR: 0:10: 'preprocessor evaluation' : bad expression
|
||||
ERROR: 0:11: '' : missing #endif
|
||||
ERROR: 9 compilation errors. No code generated.
|
||||
|
||||
|
||||
0
Test/baseResults/preprocessor.many.endif.vert.out
Normal file
0
Test/baseResults/preprocessor.many.endif.vert.out
Normal file
10
Test/preprocessor.many.endif.vert
Normal file
10
Test/preprocessor.many.endif.vert
Normal file
@@ -0,0 +1,10 @@
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if
|
||||
#else
|
||||
@@ -12,3 +12,4 @@ preprocessor.pragma.vert
|
||||
preprocessor.simple.vert
|
||||
preprocessor.success_if_parse_would_fail.vert
|
||||
preprocessor.defined.vert
|
||||
preprocessor.many.endif.vert
|
||||
|
||||
Reference in New Issue
Block a user