Another update from Larry:
[oweals/busybox.git] / cut.c
diff --git a/cut.c b/cut.c
index 7e9a72e3f7ba67eeef659bf544b5afe6f624f4a8..d852ab3be957a9230e07f6b43bb0b5f2bae26789 100644 (file)
--- a/cut.c
+++ b/cut.c
@@ -75,7 +75,7 @@ static void decompose_list(const char *list)
        /* handle multi-value cases */
        else if (nminus == 1) {
                /* handle 'N-' case */
-               if (list[strlen(list) - 1] == '-') {
+               if (last_char_is(list,'-')) {
                        startpos = strtol(list, &ptr, 10);
                }
                /* handle '-M' case */