From a9bb758e4fb38524af8b0d5f5803a91213da38d0 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Sun, 24 Jul 2005 09:17:34 +0000 Subject: [PATCH] Return a copy instead of the real string. Fixes some issues with stuff getting changed in the configuration file Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2249 --- src/misc/setup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc/setup.cpp b/src/misc/setup.cpp index 460f00b1..bf04a7bc 100644 --- a/src/misc/setup.cpp +++ b/src/misc/setup.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: setup.cpp,v 1.29 2005-07-19 19:45:33 qbix79 Exp $ */ +/* $Id: setup.cpp,v 1.30 2005-07-24 09:17:34 qbix79 Exp $ */ #include "dosbox.h" #include "cross.h" @@ -132,7 +132,7 @@ float Section_prop::Get_float(const char* _propname){ const char* Section_prop::Get_string(const char* _propname){ for(it tel=properties.begin();tel!=properties.end();tel++){ if((*tel)->propname==_propname){ - return ((*tel)->GetValue())._string->c_str(); + return string(((*tel)->GetValue())._string->c_str()).c_str(); } } return "";