Skip to content

Commit c7693c3

Browse files
committed
Parse float arguments as locale independent (fixes #118)
1 parent f920ff7 commit c7693c3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/args.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of sidplayfp, a console SID player.
33
*
4-
* Copyright 2011-2025 Leandro Nini
4+
* Copyright 2011-2026 Leandro Nini
55
* Copyright 2000-2001 Simon White
66
*
77
* This program is free software; you can redistribute it and/or modify
@@ -21,6 +21,8 @@
2121

2222
#include "player.h"
2323

24+
#include "dataParser.h"
25+
2426
#include <iostream>
2527

2628
#include <climits>
@@ -430,7 +432,7 @@ int ConsolePlayer::args(int argc, const char *argv[])
430432
}
431433
else
432434
{
433-
m_fcurve = atof(&argv[i][9]);
435+
m_fcurve = dataParser::parseDouble(&argv[i][9]);
434436
}
435437
}
436438
#ifdef FEAT_FILTER_RANGE
@@ -442,7 +444,7 @@ int ConsolePlayer::args(int argc, const char *argv[])
442444
}
443445
else
444446
{
445-
m_frange = atof(&argv[i][9]);
447+
m_frange = dataParser::parseDouble(&argv[i][9]);
446448
}
447449
}
448450
#endif

0 commit comments

Comments
 (0)