Mercurial > vim
view src/typemap @ 30136:5380551172aa v9.0.0404
patch 9.0.0404: crash when passing invalid arguments to assert_fails()
Commit: https://github.com/vim/vim/commit/1540d334a04d874c2aa9d26b82dbbcd4bc5a78de
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 7 15:20:26 2022 +0100
patch 9.0.0404: crash when passing invalid arguments to assert_fails()
Problem: Crash when passing invalid arguments to assert_fails().
Solution: Check for NULL string.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 07 Sep 2022 16:30:02 +0200 |
parents | dec4338a7da2 |
children |
line wrap: on
line source
TYPEMAP VIWIN T_VIOBJNOMUNGE VIBUF T_VIOBJNOMUNGE INPUT T_VIOBJNOMUNGE if (sv_isa($arg, \"${ntype}\")) { IV tmp = SvIV((SV*)SvRV($arg)); $var = INT2PTR($type, tmp); if (!tmp) croak(\"$ntype no longer exists\"); } else croak(\"$var is not of type ${ntype}\")