From 5381c6cf9345514714c6c1d51e4f388cca0ed6a9 Mon Sep 17 00:00:00 2001 From: axel Date: Thu, 8 Jun 2006 09:32:06 +1000 Subject: [PATCH] Fix off-by-one error when reporting line number of function call in stack traces darcs-hash:20060607233206-ac50b-d8dcddb8a12a080d3e6ec50e50c420d70eeb8401.gz --- function.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/function.c b/function.c index 00b38f195..be42b60d7 100644 --- a/function.c +++ b/function.c @@ -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;