1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-26 05:29:30 +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:
Patrick Pelletier 2018-08-20 10:10:10 -07:00 committed by Oliver Schmidt
parent b37d0a444c
commit 0a7702626f

View File

@ -23,6 +23,7 @@ int main(int argc, char **argv)
if (!x) {
return(0);
}
x[strcspn(x, "\r\n")] = 0;
filename = x;
}
else {