mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
lib/argparse fix red
Change-Id: I7bbac6de6319bf86189f079b7330d650ea95de3c
This commit is contained in:
parent
c04a944c98
commit
a8253c57dd
2 changed files with 7 additions and 6 deletions
|
@ -112,7 +112,7 @@ int bool_parse(const char **parameter, bool *choice)
|
|||
return found;
|
||||
}
|
||||
|
||||
int longnum_parse(const char **parameter, long *number, unsigned long *decimal)
|
||||
int longnum_parse(const char **parameter, long *number, long *decimal)
|
||||
{
|
||||
/* passes number and or decimal portion of number base 10 only..
|
||||
fractional portion is scaled by ARGPARSE_FRAC_DEC_MULTIPLIER
|
||||
|
@ -159,11 +159,11 @@ int longnum_parse(const char **parameter, long *number, unsigned long *decimal)
|
|||
digits++;
|
||||
start++;
|
||||
}
|
||||
if (decimal && digits <= AP_MAX_FRAC_DIGITS)
|
||||
if (decimal && digits <= ARGPARSE_MAX_FRAC_DIGITS)
|
||||
{
|
||||
if(digits < AP_MAX_FRAC_DIGITS)
|
||||
if(digits < ARGPARSE_MAX_FRAC_DIGITS)
|
||||
{
|
||||
digits = AP_MAX_FRAC_DIGITS - digits;
|
||||
digits = ARGPARSE_MAX_FRAC_DIGITS - digits;
|
||||
while (digits--)
|
||||
dec *= 10;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue