diff options
author | YRabbit <rabbit@yrabbit.cyou> | 2022-03-16 15:47:13 +1000 |
---|---|---|
committer | YRabbit <rabbit@yrabbit.cyou> | 2022-03-16 15:47:13 +1000 |
commit | c898587b87c5501fb0278990fb2bd5b2bb339fb1 (patch) | |
tree | 47782a222835e50a483e1516e5b921f9eb1dd077 | |
parent | 2df9d3537bb4836096e157c81de20d4fa937db9a (diff) | |
download | nextpnr-c898587b87c5501fb0278990fb2bd5b2bb339fb1.tar.gz nextpnr-c898587b87c5501fb0278990fb2bd5b2bb339fb1.tar.bz2 nextpnr-c898587b87c5501fb0278990fb2bd5b2bb339fb1.zip |
gowin: don't crash if no arguments are set
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
-rw-r--r-- | gowin/main.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gowin/main.cc b/gowin/main.cc index 19c1d02c..a45a49d4 100644 --- a/gowin/main.cc +++ b/gowin/main.cc @@ -56,6 +56,10 @@ po::options_description GowinCommandHandler::getArchOptions() std::unique_ptr<Context> GowinCommandHandler::createContext(dict<std::string, Property> &values) { + if (!vm.count("device")) { + log_error("The device must be specified\n"); + } + std::regex devicere = std::regex("GW1N([SZ]?)[A-Z]*-(LV|UV|UX)([0-9])(C?).*"); std::smatch match; std::string device = vm["device"].as<std::string>(); |