From 4799e82990c9fc384d3350bd84d63b2a756a414b Mon Sep 17 00:00:00 2001 From: Werner LEMBERG Date: Mon, 20 Jun 2005 21:31:49 +0000 Subject: [PATCH] * src/preproc/soelim/soelim.cpp (do_file): Append trailing zero earlier to get correct error message. --- ChangeLog | 5 +++++ src/preproc/soelim/soelim.cpp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74dfdc23..f6e09319 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-06-20 Jörgen Grahn + + * src/preproc/soelim/soelim.cpp (do_file): Append trailing zero + earlier to get correct error message. + 2005-06-16 Bernd Warken * src/roff/nroff/nroff.sh: Add support for iso-8859-15. diff --git a/src/preproc/soelim/soelim.cpp b/src/preproc/soelim/soelim.cpp index 9658333c..235dfe66 100644 --- a/src/preproc/soelim/soelim.cpp +++ b/src/preproc/soelim/soelim.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-1992, 2000, 2001, 2003, 2004 +/* Copyright (C) 1989-1992, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -159,12 +159,12 @@ int do_file(const char *filename) &file_name_in_path); int err = errno; string whole_filename(file_name_in_path ? file_name_in_path : filename); + whole_filename += '\0'; a_delete file_name_in_path; if (fp == 0) { error("can't open `%1': %2", whole_filename.contents(), strerror(err)); return 0; } - whole_filename += '\0'; current_filename = whole_filename.contents(); current_lineno = 1; set_location(); -- 2.11.4.GIT