From f17d9a7b8683341aa5573a059a21e75266757077 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Tue, 28 Nov 2006 19:15:05 +0000 Subject: [PATCH] Document the terminating '\0' in the num_get facet. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16093 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/docstring.C | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/support/docstring.C b/src/support/docstring.C index c99c7f5e65..68bb11b417 100644 --- a/src/support/docstring.C +++ b/src/support/docstring.C @@ -468,6 +468,10 @@ protected: s.reserve(64); for (; iit != eit && isNumpunct(*iit); ++iit) s += static_cast(*iit); + // We add another character, not part of the numpunct facet, + // in order to avoid setting the eofbit in the stream state, + // which would prevent any further read. The '\0' seems a + // good choice here. s += '\0'; string_num_get_facet f; f.get(s.begin(), s.end(), b, err, v);