KSPAPIExtensions
KSPAPIExtensions copied to clipboard
Fields with UI_FloatEdit but without guiFormat cause ArgumentExceptions in MathUtils.ToStringExt
https://github.com/Swamp-Ig/KSPAPIExtensions/blob/master/Source/Utils/MathUtils.cs#L99
If guiFormat is an empty string, this line will cause an ArgumentException: Index Out of Range.
It can be fixed by checking the string for non-zero length, thus:
if (format.Length > 0 && (format[0] == 'S' || format[0] == 's'))
HTH