Skip to content

Commit 0837b16

Browse files
committed
Fix decrementing the wrong band count when deleting a qso.
Fixes also a long standing bug when deleting a comment line. Fixes issue #138
1 parent 88cd4c2 commit 0837b16

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/deleteqso.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include "tlf_curses.h"
4141
#include "scroll_log.h"
4242
#include "ui_utils.h"
43+
#include "addcall.h"
4344

4445
#define QTCRECVCALLPOS 30
4546
#define QTCSENTCALLPOS 35
@@ -168,8 +169,9 @@ void delete_qso(void) {
168169
fsync(lfile);
169170
close(lfile);
170171

171-
if (qsos[nr_qsos][0] != ';') {
172-
band_score[bandinx]--;
172+
if (qsos[nr_qsos-1][0] != ';') {
173+
int band = get_band(qsos[nr_qsos-1]);
174+
band_score[band]--;
173175
qsonum--;
174176
qsonr_to_str();
175177
}

0 commit comments

Comments
 (0)