diff options
Diffstat (limited to 'coreutils/cut.c')
-rw-r--r-- | coreutils/cut.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/coreutils/cut.c b/coreutils/cut.c index 067e69b12..8cae2eca3 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c | |||
@@ -291,9 +291,16 @@ int cut_main(int argc UNUSED_PARAM, char **argv) | |||
291 | * that means "til the end of the line" */ | 291 | * that means "til the end of the line" */ |
292 | if (!*ltok) | 292 | if (!*ltok) |
293 | e = INT_MAX; | 293 | e = INT_MAX; |
294 | #if !ENABLE_PLATFORM_MINGW32 | ||
294 | else if (e < s) | 295 | else if (e < s) |
295 | bb_error_msg_and_die("%d<%d", e, s); | 296 | bb_error_msg_and_die("%d<%d", e, s); |
296 | e--; /* again, arrays are zero based, lines are 1 based */ | 297 | e--; /* again, arrays are zero based, lines are 1 based */ |
298 | #else | ||
299 | else if (e != 0) | ||
300 | e--; /* again, zero based arrays, one based lines */ | ||
301 | if (e < s) | ||
302 | bb_error_msg_and_die("%d<%d", e, s); | ||
303 | #endif | ||
297 | } | 304 | } |
298 | 305 | ||
299 | /* add the new list */ | 306 | /* add the new list */ |