Commit 87eb57b6 authored by Carson McDonald's avatar Carson McDonald

Fix off by one issue

parent 9f43a256
......@@ -2423,7 +2423,7 @@ scope_finish(codegen_scope *s)
fname_len = strlen(s->filename);
fname = codegen_malloc(s, fname_len + 1);
memcpy(fname, s->filename, fname_len);
fname[fname_len + 1] = '\0';
fname[fname_len] = '\0';
irep->filename = fname;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment