Skip to content

Commit

Permalink
Fix decrementing the wrong band count when deleting a qso.
Browse files Browse the repository at this point in the history
Fixes also a long standing bug when deleting a comment line.

Fixes issue #138
  • Loading branch information
dl1jbe committed Nov 8, 2019
1 parent 88cd4c2 commit 0837b16
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/deleteqso.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "tlf_curses.h"
#include "scroll_log.h"
#include "ui_utils.h"
#include "addcall.h"

#define QTCRECVCALLPOS 30
#define QTCSENTCALLPOS 35
Expand Down Expand Up @@ -168,8 +169,9 @@ void delete_qso(void) {
fsync(lfile);
close(lfile);

if (qsos[nr_qsos][0] != ';') {
band_score[bandinx]--;
if (qsos[nr_qsos-1][0] != ';') {
int band = get_band(qsos[nr_qsos-1]);
band_score[band]--;
qsonum--;
qsonr_to_str();
}
Expand Down

0 comments on commit 0837b16

Please sign in to comment.