Skip to content

Commit 5bf4677

Browse files
committed
Increase the number of usable STF units to 64
1 parent f385422 commit 5bf4677

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/Orts.Parsers.Msts/STFReader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ public double ReadDouble(double? defaultValue)
647647
/// </summary>
648648
// Additional entries because MSTS has multiple default units, e.g. some speeds in metres/sec and others in miles/hr
649649
[Flags]
650-
public enum UNITS
650+
public enum UNITS : ulong
651651
{
652652
/// <summary>No unit parsing is done on the {constant_item} - which is obviously fastest
653653
/// </summary>
@@ -829,7 +829,7 @@ public enum UNITS
829829
/// <summary>Valid Units: w/s, kw/s, hp/s
830830
/// <para>Scaled to watts per second.</para>
831831
/// </summary>
832-
PowerRate = 1 << 31,
832+
PowerRate = 1ul << 31,
833833

834834
// "Any" is used where units cannot easily be specified, such as generic routines for interpolating continuous data from point values.
835835
// or interpreting locomotive cab attributes from the ORTSExtendedCVF experimental mechanism.

0 commit comments

Comments
 (0)