18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-02 11:56:50 +01:00

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.
This commit is contained in:
2026-11-29 08:27:14 +01:00
parent 6aca6bc4f6
commit 5d3b3bc095
+1 -1
View File
@@ -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() };