Skip to content

Commit e395620

Browse files
committed
Automatic merge of T1.6-89-ga2a9bbcc8 and 12 pull requests
- Pull request #1156 at f46d5f2: Fix incorrectly disabled options in train operations window - Pull request #1086 at d8d61eb: Add Settings Exporter tool (copy settings to INI, etc) - Pull request #1091 at e813c42: Automatic speed control - Pull request #1115 at 270f22f: Do not activate ETS switch if no suitable cars are attached - Pull request #1120 at ba3c47f: Automatically Calculate Friction Values if Missing - Pull request #1121 at 91d2d26: Manually Override Articulation - Pull request #1124 at e241a0d: Built-in PBL2 brake controller - Pull request #1126 at 95e884f: ShapeHierarchy Attachment for More Wagon Addons - Pull request #1157 at 39cd994: Dynamic brake authorization by TCS - Pull request #1159 at 48c9a63: Skip OR warnings about TSRE-specific token Ruler - Pull request #1161 at 6cfe4e2: Fix string trim in .ini files - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge
14 parents 9802097 + a2a9bbc + f46d5f2 + d8d61eb + e813c42 + 270f22f + ba3c47f + 91d2d26 + e241a0d + 95e884f + 39cd994 + 48c9a63 + 6cfe4e2 + 5845a1a commit e395620

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Source/Orts.Simulation/Common/Scripting/PowerSupply/LocomotivePowerSupply.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ protected T LoadParameter<T>(string sectionName, string keyName, T defaultValue)
639639

640640
if (length > 0)
641641
{
642-
buffer.Trim();
642+
buffer = buffer.Trim('\0').Trim();
643643
return (T)Convert.ChangeType(buffer, typeof(T), System.Globalization.CultureInfo.InvariantCulture);
644644
}
645645
}

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/TrainControlSystem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ private T LoadParameter<T>(string sectionName, string keyName, T defaultValue)
924924

925925
if (length > 0)
926926
{
927-
buffer.Trim();
927+
buffer = buffer.Trim('\0').Trim();
928928
return (T)Convert.ChangeType(buffer, typeof(T), System.Globalization.CultureInfo.InvariantCulture);
929929
}
930930
}
@@ -936,7 +936,7 @@ private T LoadParameter<T>(string sectionName, string keyName, T defaultValue)
936936

937937
if (length > 0)
938938
{
939-
buffer.Trim();
939+
buffer = buffer.Trim('\0').Trim();
940940
return (T)Convert.ChangeType(buffer, typeof(T), System.Globalization.CultureInfo.InvariantCulture);
941941
}
942942
}

0 commit comments

Comments
 (0)