From 614566ddb51fe8925ef33a08534b58663338d4fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 4 Mar 2021 12:54:28 +0100 Subject: RemoteDebugger: Fix possible division by zero --- core/debugger/remote_debugger.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'core/debugger') diff --git a/core/debugger/remote_debugger.cpp b/core/debugger/remote_debugger.cpp index 7392e6b9a6..bdbb7766fa 100644 --- a/core/debugger/remote_debugger.cpp +++ b/core/debugger/remote_debugger.cpp @@ -76,6 +76,7 @@ public: NetworkProfiler() {} int bandwidth_usage(const Vector &p_buffer, int p_pointer) { + ERR_FAIL_COND_V(p_buffer.size() == 0, 0); int total_bandwidth = 0; uint32_t timestamp = OS::get_singleton()->get_ticks_msec(); -- cgit v1.2.3