From d63f708e2c2340d7c551f2ed2697b8b7fe0cabe8 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 26 Aug 2025 12:59:18 +0200 Subject: [PATCH] pstats: Actually support large frames (remove check) Fixes #1574 --- panda/src/pstatclient/pStatFrameData.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panda/src/pstatclient/pStatFrameData.cxx b/panda/src/pstatclient/pStatFrameData.cxx index aef68b3d9e..4397a3a5de 100644 --- a/panda/src/pstatclient/pStatFrameData.cxx +++ b/panda/src/pstatclient/pStatFrameData.cxx @@ -34,7 +34,7 @@ sort_time() { */ bool PStatFrameData:: write_datagram(Datagram &destination, PStatClient *client) const { - if (_time_data.size() >= 65536 || _level_data.size() >= 65536) { + if (_time_data.size() >= INT_MAX || _level_data.size() >= INT_MAX) { pstats_cat.info() << "Dropping frame with " << _time_data.size() << " time measurements and " << _level_data.size() @@ -63,7 +63,7 @@ write_datagram(Datagram &destination, PStatClient *client) const { ptr += 2; } - *(uint32_t *)ptr = __builtin_bswap16(_level_data.size()); + *(uint32_t *)ptr = __builtin_bswap32(_level_data.size()); ptr += 2; for (const DataPoint &dp : _level_data) {