Godot Engine – Multi-platform 2D and 3D game engine
Fix Asset Store not displaying the last page
Michael Alexsander8bc3115e0cc4
diff --git a/editor/asset_library/asset_library_editor_plugin.cpp b/editor/asset_library/asset_library_editor_plugin.cppindex 14f5bfc91cd..1972f4a3efb 100644--- a/editor/asset_library/asset_library_editor_plugin.cpp+++ b/editor/asset_library/asset_library_editor_plugin.cpp@@ -1840,7 +1840,12 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, constint page_len = 24; // API's default batch size.int total_items = d["count"];- int pages = MAX(1, total_items / page_len);++ int pages = 1;+ if (total_items > page_len) {+ pages = Math::ceil(total_items / (float)page_len);+ }+current_page = MIN(current_page, pages);Array result = d["hits"];