Changed getLineNumber() to use *line instead of a tmp var.