fix: possible division by 0

master
moneroexamples 8 years ago
parent fa168613ae
commit 99b4f34f52

@ -4092,8 +4092,7 @@ namespace xmreg
j_data["page"] = page; j_data["page"] = page;
j_data["limit"] = limit; j_data["limit"] = limit;
j_data["current_height"] = height; j_data["current_height"] = height;
j_data["total_page_no"] = (height / limit); j_data["total_page_no"] = (limit == 0 ? 0 : height / limit);
j_response["status"] = "success"; j_response["status"] = "success";

Loading…
Cancel
Save