Skip to content

Commit ef5f9b2

Browse files
authored
[PWGLF] Add return for overflow case (#14537)
1 parent cc450ba commit ef5f9b2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

PWGLF/TableProducer/Nuspex/ebyeMaker.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ float calculateDCAStraightToPV(float X, float Y, float Z, float Px, float Py, fl
9595
}
9696
void encode16bit(int const& n, uint8_t& low, uint8_t& up)
9797
{
98-
if (n >= (1 << 16))
98+
if (n >= (1 << 16)) {
9999
low = up = -1;
100+
return;
101+
}
100102
int bbyte = 8;
101103
for (int b{0}; b < bbyte; ++b) {
102104
int bl = (n & (1 << b)) >> b;

0 commit comments

Comments
 (0)