From 796a6416cab62a7327f02ac18228a47590d9a7c8 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Thu, 9 Nov 2023 15:54:11 +0100 Subject: [PATCH] Fix segmentation fault if file name is missing after arraylist command. --- test_util/arraylist.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test_util/arraylist.cpp b/test_util/arraylist.cpp index 08a1bd02d..4f1b79814 100644 --- a/test_util/arraylist.cpp +++ b/test_util/arraylist.cpp @@ -31,8 +31,9 @@ using EclEntry = Opm::EclIO::EclFile::EclEntry; static void printHelp() { - std::cout << "\nList all arrays found in an EclFile specified on the command line. \n\n" - << "\nThe program have one option which will only work on unified restart files:\n\n" + std::cout << "Usage: arraylist [OPTIONS] ECL_FILE_NAME"<= argc) + { + std::cerr<<"Eclipse file name is missing. Please provide it " + <<"as the last argument."<