[Scummvm-cvs-logs] SF.net SVN: scummvm:[49631] tools/branches/gsoc2010-decompiler/decompiler/ graph.h

pidgeot at users.sourceforge.net pidgeot at users.sourceforge.net
Sun Jun 13 15:22:16 CEST 2010


Revision: 49631
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49631&view=rev
Author:   pidgeot
Date:     2010-06-13 13:22:15 +0000 (Sun, 13 Jun 2010)

Log Message:
-----------
Proper handling of quotes in dot output

Modified Paths:
--------------
    tools/branches/gsoc2010-decompiler/decompiler/graph.h

Modified: tools/branches/gsoc2010-decompiler/decompiler/graph.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/graph.h	2010-06-13 12:58:19 UTC (rev 49630)
+++ tools/branches/gsoc2010-decompiler/decompiler/graph.h	2010-06-13 13:22:15 UTC (rev 49631)
@@ -65,7 +65,17 @@
 			for (param = inst->_params.begin(); param != inst->_params.end(); ++param) {
 				if (param != inst->_params.begin())
 					output << ",";
-				output << " " << param->_value;
+				output << " ";
+				if (param->_type != kString)
+					output << param->_value;
+				else {
+					std::string s = param->getString();
+					for (std::string::iterator it = s.begin(); it != s.end(); ++it)
+						if (*it == '"')
+							output << "\\\"";
+						else
+							output << *it;
+				}
 			}
 			output << "\\n";			
 		} while (inst++ != group._end);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list