inp.c, use function inp_deckcopy_oc() for saving the deck for later retrieval with mc_source

This commit is contained in:
h_vogt
2016-08-15 19:25:30 +02:00
committed by rlar
parent 3869e39341
commit 6ca51e9560
+2 -2
View File
@@ -344,14 +344,14 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
comfile = TRUE; comfile = TRUE;
/* save a copy of the deck for later reloading with 'mc_source' */ /* save a copy of the deck for later reloading with 'mc_source' */
if (!comfile) if (!comfile)
mc_deck = inp_deckcopy(deck); mc_deck = inp_deckcopy_oc(deck);
} }
/* inp_spsource() called with *fp == NULL: we want to reload circuit for MC simulation */ /* inp_spsource() called with *fp == NULL: we want to reload circuit for MC simulation */
else { else {
if (mc_deck) if (mc_deck)
deck = inp_deckcopy(mc_deck); deck = inp_deckcopy(mc_deck);
else { else {
fprintf(stderr, "Error: No circuit loaded, cannot copy internally\n"); fprintf(stderr, "Error: No circuit loaded, cannot copy internally using mc_source\n");
controlled_exit(1); controlled_exit(1);
} }
} }