mirror of
https://github.com/cc65/cc65.git
synced 2024-10-01 00:57:11 +00:00
seek test: remove trailing newline from filename
Looks like no one ever tried this? fopen was returning EINVAL because fgets was leaving a trailing newline at the end of the filename. (Which is what fgets is documented to do.)
This commit is contained in:
parent
b37d0a444c
commit
0a7702626f
@ -23,6 +23,7 @@ int main(int argc, char **argv)
|
|||||||
if (!x) {
|
if (!x) {
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
x[strcspn(x, "\r\n")] = 0;
|
||||||
filename = x;
|
filename = x;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user