From 499ede6ae332799c17c3f6e28fd2e8768ba15cfb Mon Sep 17 00:00:00 2001
From: Pieter Vander Vennet <pietervdvn@posteo.net>
Date: Wed, 2 Nov 2022 12:30:45 +0100
Subject: [PATCH] More invariant-cultures in toString, tests now work, fix #22

---
 AspectedRouting/IO/itinero2/LuaPrinter2.MainFunction.cs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/AspectedRouting/IO/itinero2/LuaPrinter2.MainFunction.cs b/AspectedRouting/IO/itinero2/LuaPrinter2.MainFunction.cs
index fcbbd51..a095dc0 100644
--- a/AspectedRouting/IO/itinero2/LuaPrinter2.MainFunction.cs
+++ b/AspectedRouting/IO/itinero2/LuaPrinter2.MainFunction.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Globalization;
 using System.Linq;
 using AspectedRouting.IO.LuaSkeleton;
 using AspectedRouting.IO.LuaSnippets;
@@ -45,7 +46,7 @@ namespace AspectedRouting.IO.itinero2
                 var exprInLua = _skeleton.ToLua(exprSpecialized);
                 if (exprInLua.Contains("constRight") || exprInLua.Contains("firstArg"))
                     throw new Exception("Not optimized properly:" + exprSpecialized.Repr());
-                aspects.Add(weight + " * " + exprInLua);
+                aspects.Add(weight.ToString(CultureInfo.InvariantCulture) + " * " + exprInLua.ToString(CultureInfo.InvariantCulture));
             }
 
             var scalingFactor = Funcs.Default.Apply(new Constant(Typs.Double, 1.0), _profile.ScalingFactor, tags)