Permalink
Browse files

Correctly pass a string to PdFileParser, and not a const char *.

  • Loading branch information...
1 parent 761bd10 commit 5f4cdc20c9b569f92b0b0f938620bc847ee5579c @mhroth committed Sep 14, 2011
Showing with 2 additions and 1 deletion.
  1. +1 −0 src/ObjectFactoryMap.h
  2. +1 −1 src/ZenGarden.cpp
View
@@ -24,6 +24,7 @@
#define _OBJECT_FACTORY_MAP_H_
#include <map>
+#include <string>
using namespace std;
class MessageObject;
View
@@ -168,7 +168,7 @@ ZGGraph *zg_context_new_graph_from_file(PdContext *context, const char *director
}
ZGGraph *zg_context_new_graph_from_string(PdContext *context, const char *netlist) {
- PdFileParser *parser = new PdFileParser(netlist);
+ PdFileParser *parser = new PdFileParser(string(netlist));
PdGraph *graph = parser->execute(context);
delete parser;
return graph;

0 comments on commit 5f4cdc2

Please sign in to comment.