Mercurial > vim
comparison src/vim9type.c @ 23362:f181fe2150ab v8.2.2224
patch 8.2.2224: Vim9: crash if script reloaded with different variable type
Commit: https://github.com/vim/vim/commit/07a65d26e7d76ad22d6ef23b50c0faa25e435e02
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Dec 26 20:09:15 2020 +0100
patch 8.2.2224: Vim9: crash if script reloaded with different variable type
Problem: Vim9: crash if script reloaded with different variable type.
Solution: Check the type when accessing the variable.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 26 Dec 2020 20:15:04 +0100 |
parents | 9c5275b1c763 |
children | 681f042ae5ac |
comparison
equal
deleted
inserted
replaced
23361:5c7e91d7fc6d | 23362:f181fe2150ab |
---|---|
851 } | 851 } |
852 | 852 |
853 /* | 853 /* |
854 * Check if "type1" and "type2" are exactly the same. | 854 * Check if "type1" and "type2" are exactly the same. |
855 */ | 855 */ |
856 static int | 856 int |
857 equal_type(type_T *type1, type_T *type2) | 857 equal_type(type_T *type1, type_T *type2) |
858 { | 858 { |
859 int i; | 859 int i; |
860 | 860 |
861 if (type1->tt_type != type2->tt_type) | 861 if (type1->tt_type != type2->tt_type) |