Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r422 - trunk/UserInterface


Chronological Thread 
  • From: bigler@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r422 - trunk/UserInterface
  • Date: Tue, 5 Jul 2005 16:51:36 -0600 (MDT)

Author: bigler
Date: Tue Jul  5 16:51:35 2005
New Revision: 422

Modified:
   trunk/UserInterface/XWindowUI.cc
Log:

Use strdup instead of const_cast<char*> as the data pointed to by name
was somehow corrupted.



Modified: trunk/UserInterface/XWindowUI.cc
==============================================================================
--- trunk/UserInterface/XWindowUI.cc    (original)
+++ trunk/UserInterface/XWindowUI.cc    Tue Jul  5 16:51:35 2005
@@ -252,8 +252,12 @@
   XTextProperty tp;
   ostringstream title;
   title << "Manta ray tracer (channel " << channel << ")";
-  char* name = const_cast<char*>(title.str().c_str());
+  // This used to be a const_cast<char*>(title...), but it somehow
+  // data in name pointed to was corrupted.
+  char* name = strdup(title.str().c_str());
   XStringListToTextProperty(&name, 1, &tp);
+  free(name);
+  
   XSizeHints sh;
   sh.flags = USPosition|USSize;
   




  • [MANTA] r422 - trunk/UserInterface, bigler, 07/05/2005

Archive powered by MHonArc 2.6.16.

Top of page