diff options
| author | Eli Zaretskii | 2021-05-20 12:01:40 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2021-05-20 12:01:40 +0300 |
| commit | 8b44740a6aee6254a60243df6ef3dd80ce3f3a36 (patch) | |
| tree | f17fa3bd02057459bc24d98354cbba0c61ba857a /src | |
| parent | 328efb47d04e3aa996bb8cd387d01c1a66ec29f5 (diff) | |
| download | emacs-8b44740a6aee6254a60243df6ef3dd80ce3f3a36.tar.gz emacs-8b44740a6aee6254a60243df6ef3dd80ce3f3a36.zip | |
Fix arg-out-of-range errors in 'line-number-at-pos'
* src/fns.c (Fline_number_at_pos): Pass character position to
args_out_of_range. Suggested by Andreas Schwab
<schwab@linux-m68k.org>. Call args_out_of_range_3 to show both
ends of the accessible portion.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -5919,7 +5919,7 @@ from the absolute start of the buffer, disregarding the narrowing. */) | |||
| 5919 | 5919 | ||
| 5920 | /* Check that POSITION is in the accessible range of the buffer. */ | 5920 | /* Check that POSITION is in the accessible range of the buffer. */ |
| 5921 | if (pos < BEGV || pos > ZV) | 5921 | if (pos < BEGV || pos > ZV) |
| 5922 | args_out_of_range (make_int (start), make_int (ZV)); | 5922 | args_out_of_range_3 (make_int (pos), make_int (BEGV), make_int (ZV)); |
| 5923 | 5923 | ||
| 5924 | return make_int (count_lines (start, CHAR_TO_BYTE (pos)) + 1); | 5924 | return make_int (count_lines (start, CHAR_TO_BYTE (pos)) + 1); |
| 5925 | } | 5925 | } |