mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-21 02:17:21 +00:00
Merge pull request #441 from nonoo/master
Fix decimal separators which sscanf can't handle
This commit is contained in:
commit
801e16ac97
@ -1692,6 +1692,22 @@ declare_proto_rot(set_position)
|
||||
{
|
||||
azimuth_t az;
|
||||
elevation_t el;
|
||||
char *comma_pos;
|
||||
|
||||
/* Fixing args with an invalid decimal separator. */
|
||||
comma_pos = strchr(arg1, ',');
|
||||
|
||||
if (comma_pos)
|
||||
{
|
||||
*comma_pos = '.';
|
||||
}
|
||||
|
||||
comma_pos = strchr(arg2, ',');
|
||||
|
||||
if (comma_pos)
|
||||
{
|
||||
*comma_pos = '.';
|
||||
}
|
||||
|
||||
CHKSCN1ARG(sscanf(arg1, "%f", &az));
|
||||
CHKSCN1ARG(sscanf(arg2, "%f", &el));
|
||||
|
Loading…
Reference in New Issue
Block a user