chiark / gitweb /
Fixed assertion failure if user's home directory not accessible
[userv.git] / parser.c
index 0505474cf8e244cef09af0e12e215681f09733cc..e49b5ca6895b86e6a3782bf9cc9c5b78ff2e0226 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -173,6 +173,7 @@ static int dequote(char *inplace) {
     }
   }
   assert(*p); assert(!*++p);
+  *q++= 0;
   return tokv_quotedstring;
 }
 
@@ -838,8 +839,7 @@ int df_reset(int dtoken) {
 
   r= pa_mnl(); if (r) return r;
   r= parse_string(RESET_CONFIGURATION,"<builtin reset configuration>",1);
-  assert(!r);
-  return 0;  
+  return r;
 }
 
 int dfg_fdwant(int dtoken) {
@@ -1298,9 +1298,9 @@ static int parse_file(const char *string, int *didexist) {
   
   if (didexist) *didexist= 1;
 
-  filename= xstrsave(string);
   ybuf= yy_create_buffer(file,YY_BUF_SIZE);
   if (!ybuf) syscallerror("unable to create flex buffer for file");
+  filename= xstrsave(string);
   parser_push(&usestate,filename,&newstab,ybuf,0);
   fileparselevel++;