|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53536 - trunk/libs/spirit/classic/example/fundamental
From: hartmut.kaiser_at_[hidden]
Date: 2009-06-01 10:33:14
Author: hkaiser
Date: 2009-06-01 10:33:13 EDT (Mon, 01 Jun 2009)
New Revision: 53536
URL: http://svn.boost.org/trac/boost/changeset/53536
Log:
Spirit.Classic: Fixing #3085
Text files modified:
trunk/libs/spirit/classic/example/fundamental/comments.cpp | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
Modified: trunk/libs/spirit/classic/example/fundamental/comments.cpp
==============================================================================
--- trunk/libs/spirit/classic/example/fundamental/comments.cpp (original)
+++ trunk/libs/spirit/classic/example/fundamental/comments.cpp 2009-06-01 10:33:13 EDT (Mon, 01 Jun 2009)
@@ -58,13 +58,7 @@
{
cout << "Parsing C++-comment" <<endl;
cout << "Matched (" << plast-pfirst << ") characters: ";
-
- char cbbuffer[128];
-
- strncpy(cbbuffer, pfirst, plast-pfirst);
- cbbuffer[plast-pfirst] = '\0';
-
- cout << "\"" << cbbuffer << "\"" << endl;
+ cout << "\"" << std::string(pfirst, plast) << "\"" << endl;
}
///////////////////////////////////////////////////////////////////////////////
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk