mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
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:
@@ -5323,7 +5323,7 @@ size_t string2float(const char *const text, float_T *const ret_value)
|
|||||||
*ret_value = (float_T)INFINITY;
|
*ret_value = (float_T)INFINITY;
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
if (STRNICMP(text, "-inf", 3) == 0) {
|
if (STRNICMP(text, "-inf", 4) == 0) {
|
||||||
*ret_value = (float_T)(-INFINITY);
|
*ret_value = (float_T)(-INFINITY);
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user