aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormyrtle <gatecat@ds0.me>2022-12-27 20:44:03 +0100
committerGitHub <noreply@github.com>2022-12-27 20:44:03 +0100
commit45f5e5f3889afb07907bab439cf071478ee5a2a5 (patch)
tree7194a5a9f5163f581c9c4726876b9e13d55b6e22
parenta545498d6fd0a28a006976293917115037d4628c (diff)
parenta4d32c985b5432b5a8a3c79b4470a0308a138d1f (diff)
downloadicestorm-45f5e5f3889afb07907bab439cf071478ee5a2a5.tar.gz
icestorm-45f5e5f3889afb07907bab439cf071478ee5a2a5.tar.bz2
icestorm-45f5e5f3889afb07907bab439cf071478ee5a2a5.zip
Merge pull request #305 from tomverbeure/icebram_error
Exit with error when no RAM contents were replaced.
-rw-r--r--icebram/icebram.cc4
1 files changed, 4 insertions, 0 deletions
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