comparison src/vim9execute.c @ 24450:3e1886f1e875 v8.2.2765

patch 8.2.2765: Vim9: not all blob operations work Commit: https://github.com/vim/vim/commit/0e3ff1919603ee4c4a347fdf761dbdbdeb068015 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Apr 14 20:35:23 2021 +0200 patch 8.2.2765: Vim9: not all blob operations work Problem: Vim9: not all blob operations work. Solution: Run more tests also with Vim9 script and :def functions. Fix what doesn't work.
author Bram Moolenaar <Bram@vim.org>
date Wed, 14 Apr 2021 20:45:04 +0200
parents 602e528a8e43
children 53216e87f21c
comparison
equal deleted inserted replaced
24449:ca0d84e008e5 24450:3e1886f1e875
2276 else 2276 else
2277 n2 = tv_get_number_chk(tv_idx2, &error); 2277 n2 = tv_get_number_chk(tv_idx2, &error);
2278 if (error) 2278 if (error)
2279 status = FAIL; 2279 status = FAIL;
2280 else 2280 else
2281 status = blob_set_range(tv_dest->vval.v_blob, 2281 {
2282 n1, n2, tv); 2282 long bloblen = blob_len(tv_dest->vval.v_blob);
2283
2284 if (check_blob_index(bloblen,
2285 n1, TRUE, FALSE) == FAIL
2286 || check_blob_range(bloblen,
2287 n1, n2, FALSE) == FAIL)
2288 status = FAIL;
2289 else
2290 status = blob_set_range(
2291 tv_dest->vval.v_blob, n1, n2, tv);
2292 }
2283 } 2293 }
2284 } 2294 }
2285 2295
2286 clear_tv(tv_idx1); 2296 clear_tv(tv_idx1);
2287 clear_tv(tv_idx2); 2297 clear_tv(tv_idx2);