You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix mismatched external parser with binary exports
This commit is contained in:
@@ -771,12 +771,20 @@ Error GDScript::reload(bool p_keep_state) {
|
|||||||
if (GDScriptCache::has_parser(source_path)) {
|
if (GDScriptCache::has_parser(source_path)) {
|
||||||
Error err = OK;
|
Error err = OK;
|
||||||
Ref<GDScriptParserRef> parser_ref = GDScriptCache::get_parser(source_path, GDScriptParserRef::EMPTY, err);
|
Ref<GDScriptParserRef> parser_ref = GDScriptCache::get_parser(source_path, GDScriptParserRef::EMPTY, err);
|
||||||
if (parser_ref.is_valid() && parser_ref->get_source_hash() != source.hash()) {
|
if (parser_ref.is_valid()) {
|
||||||
|
uint32_t source_hash;
|
||||||
|
if (!binary_tokens.is_empty()) {
|
||||||
|
source_hash = hash_djb2_buffer(binary_tokens.ptr(), binary_tokens.size());
|
||||||
|
} else {
|
||||||
|
source_hash = source.hash();
|
||||||
|
}
|
||||||
|
if (parser_ref->get_source_hash() != source_hash) {
|
||||||
GDScriptCache::remove_parser(source_path);
|
GDScriptCache::remove_parser(source_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool can_run = ScriptServer::is_scripting_enabled() || is_tool();
|
bool can_run = ScriptServer::is_scripting_enabled() || is_tool();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user