From a4d32c985b5432b5a8a3c79b4470a0308a138d1f Mon Sep 17 00:00:00 2001 From: Tom Verbeure Date: Tue, 27 Dec 2022 10:43:31 -0800 Subject: Exit with error when no RAM contents were replaced. --- icebram/icebram.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/icebram/icebram.cc b/icebram/icebram.cc index aacf00c..9d27ca6 100644 --- a/icebram/icebram.cc +++ b/icebram/icebram.cc @@ -384,6 +384,10 @@ int main(int argc, char **argv) if (verbose) fprintf(stderr, "Found and replaced %d instances of the memory.\n", max_replace_cnt); + if (max_replace_cnt == 0) { + fprintf(stderr, "No memory instances were replaced.\n"); + exit(2); + } // ------------------------------------------------------- // Write ascfile to stdout -- cgit v1.2.3