refactor: format casting of negative number better (#26482)

This commit is contained in:
zeertzjq
2023-12-09 11:36:11 +08:00
committed by GitHub
parent c651fb3042
commit 2ebd328a79
6 changed files with 9 additions and 9 deletions

View File

@@ -5029,7 +5029,7 @@ size_t string2float(const char *const text, float_T *const ret_value)
return 3;
}
if (STRNICMP(text, "-inf", 3) == 0) {
*ret_value = (float_T) - INFINITY;
*ret_value = (float_T)(-INFINITY);
return 4;
}
if (STRNICMP(text, "nan", 3) == 0) {