mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
maybe_annotate_source does not annotate negative positions
* libguile/read.c (maybe_annotate_source): Don't annotate with negative lines or columns.
This commit is contained in:
parent
3c01acbcf5
commit
3ddd438179
1 changed files with 5 additions and 0 deletions
|
@ -411,6 +411,11 @@ static SCM
|
||||||
maybe_annotate_source (SCM x, SCM port, scm_t_read_opts *opts,
|
maybe_annotate_source (SCM x, SCM port, scm_t_read_opts *opts,
|
||||||
long line, int column)
|
long line, int column)
|
||||||
{
|
{
|
||||||
|
/* This condition can be caused by a user calling
|
||||||
|
set-port-column!. */
|
||||||
|
if (line < 0 || column < 0)
|
||||||
|
return x;
|
||||||
|
|
||||||
if (opts->record_positions_p)
|
if (opts->record_positions_p)
|
||||||
scm_i_set_source_properties_x (x, line, column, SCM_FILENAME (port));
|
scm_i_set_source_properties_x (x, line, column, SCM_FILENAME (port));
|
||||||
return x;
|
return x;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue