You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Fix parsing hexadecimal (lowercase e,f) in shaders
(cherry picked from commit 19e0a1ec9d)
This commit is contained in:
committed by
Rémi Verschelde
parent
04fefed904
commit
29616f4a35
@@ -546,12 +546,12 @@ ShaderLanguage::Token ShaderLanguage::_get_token() {
|
||||
if (hexa_found || str.length() != 1 || str[0] != '0')
|
||||
return _make_token(TK_ERROR, "Invalid numeric constant");
|
||||
hexa_found = true;
|
||||
} else if (GETCHAR(i) == 'e') {
|
||||
if (hexa_found || exponent_found || float_suffix_found)
|
||||
} else if (GETCHAR(i) == 'e' && !hexa_found) {
|
||||
if (exponent_found || float_suffix_found)
|
||||
return _make_token(TK_ERROR, "Invalid numeric constant");
|
||||
exponent_found = true;
|
||||
} else if (GETCHAR(i) == 'f') {
|
||||
if (hexa_found || exponent_found)
|
||||
} else if (GETCHAR(i) == 'f' && !hexa_found) {
|
||||
if (exponent_found)
|
||||
return _make_token(TK_ERROR, "Invalid numeric constant");
|
||||
float_suffix_found = true;
|
||||
} else if (_is_number(GETCHAR(i))) {
|
||||
|
||||
Reference in New Issue
Block a user