gbranden pushed a commit to branch master
in repository groff.
commit 767f63edd6fb8946f3519744d9389bf3c0957396
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Sep 17 08:56:17 2021 +1000
[libgroff]: Fix off-by-one error in diagnostics.
[libgroff]: Fix off-by-one error in font and device description file
reader diagnostics.
* src/libs/libgroff/font.cpp (text_file::text_file): All text files
begin with line 1, not line 0.
Fixes <https://savannah.gnu.org/bugs/?61173>.
---
ChangeLog | 10 ++++++++++
src/libs/libgroff/font.cpp | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index d5ff675..b247a61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2021-09-17 G. Branden Robinson <[email protected]>
+ [libgroff]: Fix off-by-one error in font and device description
+ file reader diagnostics.
+
+ * src/libs/libgroff/font.cpp (text_file::text_file): All text
+ files begin with line 1, not line 0.
+
+ Fixes <https://savannah.gnu.org/bugs/?61173>.
+
+2021-09-17 G. Branden Robinson <[email protected]>
+
[libgroff]: Boolify more interfaces.
* src/include/font.h (font::unit_scale):
diff --git a/src/libs/libgroff/font.cpp b/src/libs/libgroff/font.cpp
index 9b4cbd2..c152f17 100644
--- a/src/libs/libgroff/font.cpp
+++ b/src/libs/libgroff/font.cpp
@@ -82,7 +82,7 @@ struct text_file {
};
text_file::text_file(FILE *p, char *s)
-: fp(p), path(s), lineno(0), size(0), skip_comments(1), silent(0), buf(0)
+: fp(p), path(s), lineno(1), size(0), skip_comments(1), silent(0), buf(0)
{
}
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit