Mercurial > vim
comparison src/eval.c @ 24363:1a145eb83a28 v8.2.2722
patch 8.2.2722: Vim9: crash when using LHS with double index
Commit: https://github.com/vim/vim/commit/b9c0cd897ab4ad54f514187e89719c0241393f8b
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Apr 5 20:51:00 2021 +0200
patch 8.2.2722: Vim9: crash when using LHS with double index
Problem: Vim9: crash when using LHS with double index.
Solution: Handle lhs_dest which is "dest_expr". (closes https://github.com/vim/vim/issues/8068)
Fix confusing error message for missing dict item.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 05 Apr 2021 21:00:04 +0200 |
parents | 7735cbff607d |
children | 96e0b898d5b4 |
comparison
equal
deleted
inserted
replaced
24362:63a46a4e0d55 | 24363:1a145eb83a28 |
---|---|
1472 | 1472 |
1473 if (lp->ll_newkey != NULL) | 1473 if (lp->ll_newkey != NULL) |
1474 { | 1474 { |
1475 if (op != NULL && *op != '=') | 1475 if (op != NULL && *op != '=') |
1476 { | 1476 { |
1477 semsg(_(e_letwrong), op); | 1477 semsg(_(e_dictkey), lp->ll_newkey); |
1478 return; | 1478 return; |
1479 } | 1479 } |
1480 | 1480 |
1481 // Need to add an item to the Dictionary. | 1481 // Need to add an item to the Dictionary. |
1482 di = dictitem_alloc(lp->ll_newkey); | 1482 di = dictitem_alloc(lp->ll_newkey); |