diff --git a/sed/sed.c b/sed/sed.c index d4b4a01..d701289 100644 --- a/sed/sed.c +++ b/sed/sed.c @@ -260,7 +260,7 @@ main (int argc, char **argv) lcmd_out_line_len = t-1; } - while ((opt = getopt_long (argc, argv, SHORTOPTS, longopts, NULL)) != EOF) + while ((opt = getopt_long (argc, argv, SHORTOPTS, longopts, NULL)) != -1) { switch (opt) {