mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 21:22:48 +00:00
Merge pull request #53286 from bruvzg/fix_font_data_save
This commit is contained in:
commit
8be97e3b51
@ -502,6 +502,11 @@ void FontData::set_data(const PackedByteArray &p_data) {
|
||||
}
|
||||
|
||||
PackedByteArray FontData::get_data() const {
|
||||
if (unlikely((size_t)data.size() != data_size)) {
|
||||
PackedByteArray *data_w = const_cast<PackedByteArray *>(&data);
|
||||
data_w->resize(data_size);
|
||||
memcpy(data_w->ptrw(), data_ptr, data_size);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user