Fix off-by-one error when reporting line number of function call in stack traces

darcs-hash:20060607233206-ac50b-d8dcddb8a12a080d3e6ec50e50c420d70eeb8401.gz
This commit is contained in:
axel 2006-06-08 09:32:06 +10:00
parent 20e5d298a0
commit 5381c6cf93

View File

@ -160,7 +160,7 @@ void function_add( const wchar_t *name,
function_remove( name );
d = malloc( sizeof( function_data_t ) );
d->definition_offset = parse_util_lineno( parser_get_buffer(), current_block->tok_pos );
d->definition_offset = parse_util_lineno( parser_get_buffer(), current_block->tok_pos )-1;
d->cmd = wcsdup( val );
cmd_end = d->cmd + wcslen(d->cmd)-1;