Use the right value when getting a function's defref.

Either I had gotten confused while writing the code and mixed up line and
offset, or I had changed offset to line at one stage but missed a place.
This fixes the segfault when compiling chewed-alias.r and return-ivar.r
This commit is contained in:
Bill Currie 2013-06-24 09:16:55 +09:00
parent 88692f92d9
commit 64f76bd762

View file

@ -876,7 +876,7 @@ process_funcs (qfo_t *qfo)
func->file = linker_add_string (QFOSTR (qfo, func->file));
if (func->code > 0)
func->code += work_base[qfo_code_space];
func->def = qfo->defs[func->def].offset; // defref index
func->def = qfo->defs[func->def].line; // defref index
func->locals_space = qfo->spaces[func->locals_space].id;
if (func->line_info)
func->line_info += work->num_lines - 1; //FIXME order dependent