kopia lustrzana https://github.com/Hamlib/Hamlib
Fix rotctl \dump_caps output
rot_sprintf_status() was printing items multiple times.
Cause of problem noticed by cppcheck.
(cherry picked from commit 0b75b96ef1
)
Hamlib-4.6.3
rodzic
f518c478f2
commit
53c30fcf8c
|
@ -358,6 +358,8 @@ typedef enum {
|
|||
ROT_STATUS_OVERLAP_LEFT = (1 << 14), /*!< The azimuth rotator has rotated left (CCW) past 0 degrees. */
|
||||
ROT_STATUS_OVERLAP_RIGHT = (1 << 16), /*!< The azimuth rotator has rotated right (CW) past 360 degrees. */
|
||||
} rot_status_t;
|
||||
// Update this if any additions to status definitions
|
||||
#define HAMLIB_MAX_ROTOR_STATUS 16
|
||||
|
||||
//! @cond Doxygen_Suppress
|
||||
/* So far only used in tests/sprintflst.c. */
|
||||
|
|
|
@ -816,7 +816,7 @@ int rot_sprintf_status(char *str, int nlen, rot_status_t status)
|
|||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < HAMLIB_MAX_ROTORS; i++)
|
||||
for (i = 0; i <= HAMLIB_MAX_ROTOR_STATUS; i++)
|
||||
{
|
||||
const char *sv = rot_strstatus(status & ROT_STATUS_N(i));
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue