You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Fix surface_get_arrays returns wrong index array when using empty vertex array
This commit is contained in:
@@ -1685,7 +1685,7 @@ Array RenderingServer::_get_array_from_surface(uint64_t p_format, Vector<uint8_t
|
|||||||
|
|
||||||
Vector<int> arr;
|
Vector<int> arr;
|
||||||
arr.resize(p_index_len);
|
arr.resize(p_index_len);
|
||||||
if (p_vertex_len <= (1 << 16)) {
|
if (p_vertex_len <= (1 << 16) && p_vertex_len > 0) {
|
||||||
int *w = arr.ptrw();
|
int *w = arr.ptrw();
|
||||||
|
|
||||||
for (int j = 0; j < p_index_len; j++) {
|
for (int j = 0; j < p_index_len; j++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user