Mercurial > vim
comparison src/vim9class.c @ 32547:feb9a581eb00 v9.0.1605
patch 9.0.1605: crash when calling method on super in child constructor
Commit: https://github.com/vim/vim/commit/114ec813b3a7f70d7a1c86e87226f5273e9d1def
Author: Ernie Rael <errael@raelity.com>
Date: Sun Jun 4 18:11:35 2023 +0100
patch 9.0.1605: crash when calling method on super in child constructor
Problem: Crash when calling method on super in child constructor. (Israel
Chauca Fuentes)
Solution: Clear the type list. (Ernie Rael, closes #12489, closes #12471)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 04 Jun 2023 19:15:03 +0200 |
parents | d542423ef5c9 |
children | 5c4c2d82d751 |
comparison
equal
deleted
inserted
replaced
32546:3f3e8b7ec2d5 | 32547:feb9a581eb00 |
---|---|
1023 } | 1023 } |
1024 *fup = ALLOC_MULT(ufunc_T *, *fcount); | 1024 *fup = ALLOC_MULT(ufunc_T *, *fcount); |
1025 if (*fup == NULL) | 1025 if (*fup == NULL) |
1026 goto cleanup; | 1026 goto cleanup; |
1027 | 1027 |
1028 mch_memmove(*fup, gap->ga_data, sizeof(ufunc_T *) * gap->ga_len); | 1028 if (gap->ga_len != 0) |
1029 mch_memmove(*fup, gap->ga_data, | |
1030 sizeof(ufunc_T *) * gap->ga_len); | |
1029 vim_free(gap->ga_data); | 1031 vim_free(gap->ga_data); |
1030 if (loop == 1) | 1032 if (loop == 1) |
1031 cl->class_class_function_count_child = gap->ga_len; | 1033 cl->class_class_function_count_child = gap->ga_len; |
1032 else | 1034 else |
1033 cl->class_obj_method_count_child = gap->ga_len; | 1035 cl->class_obj_method_count_child = gap->ga_len; |