Mercurial > vim
comparison src/userfunc.c @ 9597:3ca0fd9709b1 v7.4.2076
commit https://github.com/vim/vim/commit/4f0383bc3fe5af0229fb66b53fe94329af783eff
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jul 19 22:43:11 2016 +0200
patch 7.4.2076
Problem: Syntax error when dict has '>' key.
Solution: Check for endchar. (Ken Takata)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 19 Jul 2016 22:45:06 +0200 |
parents | 8dced5ab4615 |
children | 0e7912e7064b |
comparison
equal
deleted
inserted
replaced
9596:a638edc96bb6 | 9597:3ca0fd9709b1 |
---|---|
148 func_init() | 148 func_init() |
149 { | 149 { |
150 hash_init(&func_hashtab); | 150 hash_init(&func_hashtab); |
151 } | 151 } |
152 | 152 |
153 /* Get function arguments. */ | 153 /* |
154 * Get function arguments. | |
155 */ | |
154 static int | 156 static int |
155 get_function_args( | 157 get_function_args( |
156 char_u **argp, | 158 char_u **argp, |
157 char_u endchar, | 159 char_u endchar, |
158 garray_T *newargs, | 160 garray_T *newargs, |
230 if (!skip) | 232 if (!skip) |
231 EMSG2(_(e_invarg2), *argp); | 233 EMSG2(_(e_invarg2), *argp); |
232 break; | 234 break; |
233 } | 235 } |
234 } | 236 } |
235 ++p; /* skip the ')' */ | 237 if (*p != endchar) |
238 goto err_ret; | |
239 ++p; /* skip "endchar" */ | |
236 | 240 |
237 *argp = p; | 241 *argp = p; |
238 return OK; | 242 return OK; |
239 | 243 |
240 err_ret: | 244 err_ret: |