From ad464a22d6df5e01dfa4c004087240fbf7fc597a Mon Sep 17 00:00:00 2001 From: Mario Ciacco Date: Sun, 18 Jan 2026 18:03:20 +0100 Subject: [PATCH] Add return for overflow case --- PWGLF/TableProducer/Nuspex/ebyeMaker.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx b/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx index c89883b011c..1c23efd6cc7 100644 --- a/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx +++ b/PWGLF/TableProducer/Nuspex/ebyeMaker.cxx @@ -95,8 +95,10 @@ float calculateDCAStraightToPV(float X, float Y, float Z, float Px, float Py, fl } void encode16bit(int const& n, uint8_t& low, uint8_t& up) { - if (n >= (1 << 16)) + if (n >= (1 << 16)) { low = up = -1; + return; + } int bbyte = 8; for (int b{0}; b < bbyte; ++b) { int bl = (n & (1 << b)) >> b;