mirror of
git://git.suckless.org/sbase
synced 2024-12-23 07:25:07 +00:00
Testing before rage. Suffix is fixed in basename.
This commit is contained in:
parent
3817f78f87
commit
3863ccdf98
@ -32,9 +32,9 @@ main(int argc, char *argv[])
|
||||
usage();
|
||||
|
||||
s = basename(argv[0]);
|
||||
if (suffix) {
|
||||
n = strlen(s) - strlen(suffix);
|
||||
if (!strcmp(&s[n], suffix))
|
||||
if (argc == 2 && argv[1]) {
|
||||
n = strlen(s) - strlen(argv[1]);
|
||||
if (!strcmp(&s[n], argv[1]))
|
||||
s[n] = '\0';
|
||||
}
|
||||
puts(s);
|
||||
|
Loading…
Reference in New Issue
Block a user