Skip to content

Commit 00d1eb2

Browse files
authored
Update rtext.c (#3777)
1 parent eed56a4 commit 00d1eb2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/rtext.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -1471,13 +1471,14 @@ float TextToFloat(const char *text)
14711471
text++;
14721472
}
14731473

1474-
for (int i = 0; ((text[i] >= '0') && (text[i] <= '9')); i++) value = value*10.0f + (float)(text[i] - '0');
1474+
int i = 0;
1475+
for (; ((text[i] >= '0') && (text[i] <= '9')); i++) value = value*10.0f + (float)(text[i] - '0');
14751476

14761477
if (text[i++] != '.') value *= sign;
14771478
else
14781479
{
14791480
float divisor = 10.0f;
1480-
for (int i = 0; ((text[i] >= '0') && (text[i] <= '9')); i++)
1481+
for (; ((text[i] >= '0') && (text[i] <= '9')); i++)
14811482
{
14821483
value += ((float)(text[i] - '0'))/divisor;
14831484
divisor = divisor*10.0f;

0 commit comments

Comments
 (0)