We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8bee7c commit cc88e0bCopy full SHA for cc88e0b
src/rtext.c
@@ -1467,8 +1467,7 @@ float TextToFloat(const char *text)
1467
int i = 0;
1468
for (; ((text[i] >= '0') && (text[i] <= '9')); i++) value = value*10.0f + (float)(text[i] - '0');
1469
1470
- if (text[i++] != '.') value *= sign;
1471
- else
+ if (text[i++] == '.')
1472
{
1473
float divisor = 10.0f;
1474
for (; ((text[i] >= '0') && (text[i] <= '9')); i++)
@@ -1478,7 +1477,7 @@ float TextToFloat(const char *text)
1478
1477
}
1479
1480
1481
- return value;
+ return value*sign;
1482
1483
1484
#if defined(SUPPORT_TEXT_MANIPULATION)
0 commit comments