[Gridflow-cvs] [svn] commit: r3928 - /trunk/base/flow_objects.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Fri Jun 20 16:20:12 EDT 2008


Author: matju
Date: Fri Jun 20 16:20:11 2008
New Revision: 3928

Log:
fix dangling pointer error in [display]

Modified:
    trunk/base/flow_objects.c

Modified: trunk/base/flow_objects.c
==============================================================================
--- trunk/base/flow_objects.c (original)
+++ trunk/base/flow_objects.c Fri Jun 20 16:20:11 2008
@@ -2547,7 +2547,8 @@
  	void show() {
 		std::ostringstream quoted;
 	//	def quote(text) "\"" + text.gsub(/["\[\]\n\$]/m) {|x| if x=="\n" then "\\n" else "\\"+x end } + "\"" end
-		const char *s = text.str().data();
+		std::string ss = text.str();
+		const char *s = ss.data();
 		int n = text.str().length();
 		for (int i=0;i<n;i++) {
 			if (s[i]=='\n') quoted << "\\n";



More information about the Gridflow-cvs mailing list