parse: initialize log buffer
authorChristian Weisgerber <naddy@mips.inka.de>
Mon, 1 Aug 2011 20:51:19 +0000 (13:51 -0700)
committerDavid Schleef <ds@schleef.org>
Mon, 1 Aug 2011 20:52:05 +0000 (13:52 -0700)
Make sure the log buffer starts out with a valid zero-length
string.

orc/orcparse.c

index 83fb987..d655839 100644 (file)
@@ -71,6 +71,7 @@ orc_parse_full (const char *code, OrcProgram ***programs, char **log)
   parser->log = malloc(100);
   parser->log_alloc = 100;
   parser->log_size = 0;
+  parser->log[0] = 0;
 
   while (parser->p[0] != 0) {
     char *p;