mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C#: Fix outputting floats to the trap file. In some locales, the extractor output invalid floating point values to the trap file.
This commit is contained in:
@@ -162,7 +162,7 @@ namespace Semmle.Extraction
|
||||
|
||||
public static void WriteTrapFloat(this TextWriter trapFile, float f)
|
||||
{
|
||||
trapFile.Write(f.ToString("0.#####e0")); // Trap importer won't accept ints
|
||||
trapFile.Write(f.ToString("F5", System.Globalization.CultureInfo.InvariantCulture)); // Trap importer won't accept ints
|
||||
}
|
||||
|
||||
public static void WriteTuple(this TextWriter trapFile, string name, params object[] @params)
|
||||
|
||||
Reference in New Issue
Block a user