diff --git a/source/shared_lib/sources/util/conversion.cpp b/source/shared_lib/sources/util/conversion.cpp index aae5d787a..c565e185e 100644 --- a/source/shared_lib/sources/util/conversion.cpp +++ b/source/shared_lib/sources/util/conversion.cpp @@ -117,12 +117,16 @@ string intToHex(int i){ } string floatToStr(float f,int precsion) { + setlocale(LC_NUMERIC, "C"); + char str[strSize]=""; snprintf(str, strSize-1, "%.*f", precsion,f); return (str[0] != '\0' ? str : ""); } string doubleToStr(double d,int precsion) { + setlocale(LC_NUMERIC, "C"); + char str[strSize]=""; snprintf(str, strSize-1, "%.*f", precsion,d); return (str[0] != '\0' ? str : "");