From 53efa4c381a7d75beeef2bacc3359dea4f52ad31 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Fri, 26 Aug 2022 15:56:48 +0200 Subject: [PATCH] if ALt-x (compare schematics) is given before setting a compare filename, schematic is compared with saved version of itself --- src/xinit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xinit.c b/src/xinit.c index 21e60515..5676da9a 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -679,8 +679,8 @@ int compare_schematics(const char *f) my_strncpy(xctx->sch_to_compare, f, S(xctx->sch_to_compare)); } if(!xctx->sch_to_compare[0]) { - dbg(0, "compare_schematics() schematic to compare with not set\n"); - return -1; + my_strncpy(xctx->sch_to_compare, abs_sym_path(xctx->current_name, ""), S(xctx->sch_to_compare)); + dbg(0, "Compare current schematic with saved version of itself!\n"); } /* HASH SCHEMATIC 1 */