vim-patch:9.1.1300: wrong detection of -inf (#33474)

Problem:  wrong detection of -inf
Solution: correctly compare 4 characters and not 3
          (John Marriott)

closes: vim/vim#17109

10f69298b4

Co-authored-by: John Marriott <basilisk@internode.on.net>
This commit is contained in:
zeertzjq
2025-04-15 08:58:00 +08:00
committed by GitHub
parent 3341ab0776
commit 9272dc9597

View File

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