From 2e5110dca3b9b40f717e9595572cc824d8e011cd Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 22 Sep 2003 13:06:27 +0000 Subject: [PATCH] Use NUL-transparent string-constructurs, thanks to Phil Dennis --- zoom/zrec.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/zoom/zrec.cpp b/zoom/zrec.cpp index 92c9662..38cce34 100644 --- a/zoom/zrec.cpp +++ b/zoom/zrec.cpp @@ -1,4 +1,4 @@ -// $Header: /home/cvsroot/yaz++/zoom/zrec.cpp,v 1.6 2003-07-02 10:25:13 adam Exp $ +// $Header: /home/cvsroot/yaz++/zoom/zrec.cpp,v 1.7 2003-09-22 13:06:27 mike Exp $ // Z39.50 Record class @@ -84,11 +84,13 @@ namespace ZOOM { std::string record::render() const { int len; - return ZOOM_record_get(r, "render", &len); + const char* data = ZOOM_record_get(r, "render", &len); + return std::string(data, len); } std::string record::rawdata() const { int len; - return ZOOM_record_get(r, "raw", &len); + const char* data = ZOOM_record_get(r, "raw", &len); + return std::string(data, len); } } -- 1.7.10.4