소스 검색

rtext: always multiply by sign in TextToFloat() (#4273)

Co-authored-by: Listeria monocytogenes <listeria@disroot.org>
pull/4274/head
listeria 10 달 전
committed by GitHub
부모
커밋
cc88e0b780
No known key found for this signature in database GPG 키 ID: B5690EEEBB952194
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. +2
    -3
      src/rtext.c

+ 2
- 3
src/rtext.c 파일 보기

@ -1467,8 +1467,7 @@ float TextToFloat(const char *text)
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
if (text[i++] == '.')
{
float divisor = 10.0f;
for (; ((text[i] >= '0') && (text[i] <= '9')); i++)
@ -1478,7 +1477,7 @@ float TextToFloat(const char *text)
}
}
return value;
return valueo">*sign;
}
#if defined(SUPPORT_TEXT_MANIPULATION)

불러오는 중...
취소
저장