Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions Source/Checker/Checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,19 @@ bool PolicyChecker::RuleElement::compare(const std::string& v1, const std::stri
{
bool to_return = false;

char* val_end=NULL;
double val = strtod(v2.c_str(), &val_end);
char* ref_end=NULL;
double ref = strtod(v1.c_str(), &ref_end);
char* val_end = NULL;
char* ref_end = NULL;
#ifdef _WIN32
_locale_t c_locale = _create_locale(LC_NUMERIC, "C");
double val = _strtod_l(v2.c_str(), &val_end, c_locale);
double ref = _strtod_l(v1.c_str(), &ref_end, c_locale);
_free_locale(c_locale);
#else
locale_t c_locale = newlocale(LC_NUMERIC_MASK, "C", NULL);
double val = strtod_l(v2.c_str(), &val_end, c_locale);
double ref = strtod_l(v1.c_str(), &ref_end, c_locale);
freelocale(c_locale);
#endif // _WIN32

if (operand=="starts with")
{
Expand Down
Loading