summaryrefslogtreecommitdiffhomepage
path: root/src/rtext.c
diff options
context:
space:
mode:
authorRay <[email protected]>2024-02-04 11:18:46 +0100
committerRay <[email protected]>2024-02-04 11:18:46 +0100
commit868d515fbc6805d506bf97cf134379d6c293d75c (patch)
treee6ff9220c8dffd8196bc93893de7a775268dc1cf /src/rtext.c
parenteed56a45d61f40edbe2cbdddc3bd3c333b5cd165 (diff)
downloadraylib-868d515fbc6805d506bf97cf134379d6c293d75c.tar.gz
raylib-868d515fbc6805d506bf97cf134379d6c293d75c.zip
Update rtext.c
Diffstat (limited to 'src/rtext.c')
-rw-r--r--src/rtext.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rtext.c b/src/rtext.c
index 6163a92a..c6187a0a 100644
--- a/src/rtext.c
+++ b/src/rtext.c
@@ -1471,13 +1471,14 @@ float TextToFloat(const char *text)
text++;
}
- for (int i = 0; ((text[i] >= '0') && (text[i] <= '9')); i++) value = value*10.0f + (float)(text[i] - '0');
+ int i = 0;
+ for (; ((text[i] >= '0') && (text[i] <= '9')); i++) value = value*10.0f + (float)(text[i] - '0');
if (text[i++] != '.') value *= sign;
else
{
float divisor = 10.0f;
- for (int i = 0; ((text[i] >= '0') && (text[i] <= '9')); i++)
+ for (; ((text[i] >= '0') && (text[i] <= '9')); i++)
{
value += ((float)(text[i] - '0'))/divisor;
divisor = divisor*10.0f;