mirror of
https://github.com/vim/vim.git
synced 2025-11-16 23:24:03 -05:00
patch 9.1.1765: f_isnan() and f_isinf() do not correctly initialize rettv type
Problem: f_isnan() and f_isinf() do not correctly initialize rettv type
Solution: Initialize them with type: VAR_NUMBER and value 0 (Damien Lejay).
Both builtins wrote only rettv->vval.v_number and relied on call_func()
initialising rettv->v_type to VAR_NUMBER. Explicitly set
rettv->v_type = VAR_NUMBER;
rettv->vval.v_number = 0;
at function entry to avoid undefined behaviour and make the return type
self-contained.
closes: #18307
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
049c76f0e8
commit
19fa46a469
@@ -724,6 +724,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1765,
|
||||
/**/
|
||||
1764,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user