display proc name in error message raised from `pic_get_args`

This commit is contained in:
Sunrin SHIMURA (keen) 2015-02-04 13:46:29 +00:00
parent 65967f2e05
commit 06a2b09e69
1 changed files with 2 additions and 1 deletions

View File

@ -96,7 +96,8 @@ pic_get_args(pic_state *pic, const char *format, ...)
/* check argc. */
if (argc < paramc || (paramc + optc < argc && ! rest)) {
pic_errorf(pic, "%s: wrong number of arguments (%d for %s%d)",
"procname", argc,
pic_symbol_name(pic, pic_proc_name(pic_proc_ptr(GET_OPERAND(pic, 0)))) ,
argc,
rest? "at least " : "",
paramc);
}