From 5d3b3bc09503da8b8283514f71896da8cef7224b Mon Sep 17 00:00:00 2001 From: Hirek193 Date: Sun, 29 Nov 2026 08:27:14 +0100 Subject: [PATCH] fix(debug): the couplings in the coupler line of the debug panel as a number, not the set The coupler line of the debug panel passed the CouplingSet itself to snprintf under %d. A class object through varargs is undefined behaviour (SonarCloud S2275, a blocker on #531); it now passes CouplingFlag.Bits(), the same number the line showed before. --- application/driveruipanels.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/driveruipanels.cpp b/application/driveruipanels.cpp index 15ff54b1a..3e3ce61f0 100644 --- a/application/driveruipanels.cpp +++ b/application/driveruipanels.cpp @@ -1054,7 +1054,7 @@ debug_panel::update_vehicle_coupler( VehicleEnd const Side ) { controltype.c_str(), connected->name().c_str(), adapterstatus.c_str(), - physics.Couplers[ Side ].CouplingFlag, + physics.Couplers[ Side ].CouplingFlag.Bits(), physics.Neighbours[ Side ].distance ); return { m_buffer.data() };