Merge pull request #32123 from qarmin/fix_int_overflow

Fix int overflow in EditorResourcePreview::_preview_ready
This commit is contained in:
Rémi Verschelde 2019-09-20 17:36:07 +02:00 committed by GitHub
commit 54eb4bce5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,7 +116,7 @@ void EditorResourcePreview::_preview_ready(const String &p_str, const Ref<Textur
uint64_t modified_time = 0;
if (p_str.begins_with("ID:")) {
hash = p_str.get_slicec(':', 2).to_int();
hash = uint32_t(p_str.get_slicec(':', 2).to_int64());
path = "ID:" + p_str.get_slicec(':', 1);
} else {
modified_time = FileAccess::get_modified_time(path);