Skip to content

Commit

Permalink
fixup! fixup! fixup! [eclipse-wakaamaGH-494] ci: Build and test on mu…
Browse files Browse the repository at this point in the history
…ltiple architectures
  • Loading branch information
rettichschnidi committed Apr 7, 2021
1 parent aaeb8d6 commit 5499dfd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions core/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ int utils_textToFloat(const uint8_t * buffer,
{
if (isdigit(buffer[i]))
{
if (result > (DBL_MAX / 10)) {
printf("%s (%d): Returning error because %f > %f\n", __func__,
__LINE__, result, (DBL_MAX / 10));
return 0;
}
result *= 10;
result += (buffer[i] - '0');
if (result > DBL_MAX) {
printf("%s (%d): Returning error because %f > DBL_MAX\n", __func__,
__LINE__, result);
return 0;
}
}
else
{
Expand All @@ -185,6 +185,7 @@ int utils_textToFloat(const uint8_t * buffer,
}
i++;
}
/* Parse fractional part */
if (i < length && buffer[i] == '.')
{
double dec;
Expand Down

0 comments on commit 5499dfd

Please sign in to comment.