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:
@@ -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() };
|
||||
|
||||
Reference in New Issue
Block a user