From a9a5e52a23420d90e5010d7bb8618a04957cb2c3 Mon Sep 17 00:00:00 2001 From: jyelon Date: Thu, 18 Dec 2025 15:08:55 -0500 Subject: [PATCH] Fix a crash if you don't specify 'lpxserver' --- luprex/cpp/drv/driver.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/luprex/cpp/drv/driver.cpp b/luprex/cpp/drv/driver.cpp index 9da61e68..9558a587 100644 --- a/luprex/cpp/drv/driver.cpp +++ b/luprex/cpp/drv/driver.cpp @@ -632,6 +632,12 @@ class Driver { } } + // Make sure there's exactly one argument left for the engine type. + if (argc != 1) { + std::cerr << "Must specify the engine type" << std::endl; + return 1; + } + // Initialize state variables. read_console_recently_ = false; chbuf_.reset(new char[DRV_SHORTSTRING_SIZE]);