From 9ba9b83d092c9d8d7e6bfd1f412bd1a6e988b414 Mon Sep 17 00:00:00 2001 From: Artem Senichev Date: Wed, 17 Mar 2021 12:32:04 +0300 Subject: [PATCH] Fix condition check in options handler Prevents infinite loop in case of using the 'cp' action. Signed-off-by: Artem Senichev --- mtd-util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mtd-util.cpp b/mtd-util.cpp index 7f2f98d..319f5a8 100644 --- a/mtd-util.cpp +++ b/mtd-util.cpp @@ -340,7 +340,7 @@ int main(int argc, char* argv[]) optind++; } #ifdef DEVELOPER_OPTIONS - if (argv[optind][0] == 'e') + else if (argv[optind][0] == 'e') { int offset = 0; action = ACTION_ERASE;