X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/592e8d4d010441b079f98b88c2f1af0b62a47cd1..febef6caeca3c31c336edd636609d9f4ec865452:/src/files.c diff --git a/src/files.c b/src/files.c index f6e80db8..1252aab0 100644 --- a/src/files.c +++ b/src/files.c @@ -384,11 +384,11 @@ compute_base_names (void) else { /* Otherwise, the short base name is computed from the input - grammar: `foo.yy' => `foo'. */ + grammar: `foo/bar.yy' => `bar'. */ filename_split (infile, &base, &tab, &ext); short_base_name = - xstrndup (infile, - (strlen (infile) - (ext ? strlen (ext) : 0))); + xstrndup (base, + (strlen (base) - (ext ? strlen (ext) : 0))); } /* In these cases, always append `.tab'. */