]> granicus.if.org Git - graphviz/commitdiff
Null out input file name after parsing, as a user may have set the file name before...
authorEmden Gansner <emdenrg@google.com>
Thu, 22 Dec 2016 17:15:39 +0000 (12:15 -0500)
committerEmden Gansner <emdenrg@google.com>
Thu, 22 Dec 2016 17:15:39 +0000 (12:15 -0500)
lib/cgraph/io.c

index 34513deab491d319cc68d1337a3bf98c0a7ba6ef..51b7a1296bd19087cb1d1f36486dbec30afd42b9 100644 (file)
@@ -143,12 +143,12 @@ Agraph_t *agmemread(const char *cp)
     disc.mem = &AgMemDisc;
     disc.id = &AgIdDisc;
     disc.io = &memIoDisc;  
+    g = agread (&rdr, &disc);
     /* Null out filename and reset line number 
      * The name may have been set with a ppDirective, and
      * we want to reset line_num.
      */
     agsetfile(NULL);
-    g = agread (&rdr, &disc);
     return g;
 }