mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 9.0.1091: assignment to non-existing member causes a crash
Problem: Assignment to non-existing member causes a crash. (Yegappan Lakshmanan) Solution: Give an error message and bail out when a member cannot be found.
This commit is contained in:
@@ -569,8 +569,9 @@ cleanup:
|
||||
}
|
||||
|
||||
/*
|
||||
* Find member "name" in class "cl" and return its type.
|
||||
* When not found t_any is returned.
|
||||
* Find member "name" in class "cl", set "member_idx" to the member index and
|
||||
* return its type.
|
||||
* When not found "member_idx" is set to -1 and t_any is returned.
|
||||
*/
|
||||
type_T *
|
||||
class_member_type(
|
||||
@@ -591,6 +592,8 @@ class_member_type(
|
||||
return m->ocm_type;
|
||||
}
|
||||
}
|
||||
|
||||
semsg(_(e_unknown_variable_str), name);
|
||||
return &t_any;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user