From: Mike Taylor Date: Mon, 22 Sep 2003 13:06:27 +0000 (+0000) Subject: Use NUL-transparent string-constructurs, thanks to Phil Dennis X-Git-Tag: YAZPP.0.7.pre1~15 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=2e5110dca3b9b40f717e9595572cc824d8e011cd;p=yazpp-moved-to-github.git Use NUL-transparent string-constructurs, thanks to Phil Dennis --- 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); } }