From 51d7ad03a716086371e9d81a52593ed3787eb3b2 Mon Sep 17 00:00:00 2001 From: David Chen Date: Sun, 15 Apr 2018 19:08:34 +0800 Subject: [PATCH 1/2] Fix incorrect behavior when FuelTable is null. --- src/QSP/FuelCalculation/FuelData/IFuelTableExtension.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/QSP/FuelCalculation/FuelData/IFuelTableExtension.cs b/src/QSP/FuelCalculation/FuelData/IFuelTableExtension.cs index 911e8d0a..69e53c71 100644 --- a/src/QSP/FuelCalculation/FuelData/IFuelTableExtension.cs +++ b/src/QSP/FuelCalculation/FuelData/IFuelTableExtension.cs @@ -2,9 +2,12 @@ { public static class IFuelTableExtension { + /// + /// Returns null if f is null. + /// public static IFuelTable WithBias(this IFuelTable f, double bias) { - return new Helper(f, bias); + return f == null ? null : new Helper(f, bias); } private class Helper : IFuelTable From 84eedda594799e109ddda7e099a9f2c46182ebfa Mon Sep 17 00:00:00 2001 From: David Chen Date: Sun, 15 Apr 2018 19:11:28 +0800 Subject: [PATCH 2/2] Update version. --- src/QSP/ChangeLog.txt | 5 ++++- src/QSP/Properties/AssemblyInfo.cs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/QSP/ChangeLog.txt b/src/QSP/ChangeLog.txt index 2a5d0844..707d2150 100644 --- a/src/QSP/ChangeLog.txt +++ b/src/QSP/ChangeLog.txt @@ -1,4 +1,7 @@ -version 0.4.3 +version 0.4.4 +* Fix errors when calculating fuel with certain aircrafts. + +version 0.4.3 * Add profiles for A320 family. * Fix fuel burn bias bug. diff --git a/src/QSP/Properties/AssemblyInfo.cs b/src/QSP/Properties/AssemblyInfo.cs index c0880494..ebc492ae 100644 --- a/src/QSP/Properties/AssemblyInfo.cs +++ b/src/QSP/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.4.3.0")] +[assembly: AssemblyVersion("0.4.4.0")] [assembly: AssemblyFileVersion("1.0.0.0")]