diff --git a/techlibs/common/synth.cc b/techlibs/common/synth.cc index e5013678a..f604b67c9 100644 --- a/techlibs/common/synth.cc +++ b/techlibs/common/synth.cc @@ -151,7 +151,7 @@ struct SynthPass : public ScriptPass { flatten = true; continue; } - if (args[argidx] == "-lut") { + if (args[argidx] == "-lut" && argidx + 1 < args.size()) { lut = atoi(args[++argidx].c_str()); continue; }