diff --git a/src/amplifier.c b/src/amplifier.c index 6b522ed5c..c68c45295 100644 --- a/src/amplifier.c +++ b/src/amplifier.c @@ -412,6 +412,8 @@ int HAMLIB_API amp_open(AMP *amp) if (status != RIG_OK) { + memcpy(&->state.ampport_deprecated, &->state.ampport, + sizeof(amp->state.ampport_deprecated)); return status; } } diff --git a/src/rotator.c b/src/rotator.c index edf624c72..f71197a5a 100644 --- a/src/rotator.c +++ b/src/rotator.c @@ -484,6 +484,8 @@ int HAMLIB_API rot_open(ROT *rot) if (status != RIG_OK) { + memcpy(&rot->state.rotport_deprecated, &rot->state.rotport, + sizeof(rot->state.rotport_deprecated)); return status; } }