Fix Iambic B over-memory-ing

This commit is contained in:
Neale Pickett 2022-05-28 21:23:26 -06:00
parent a6eaae4da1
commit d99f59cffa
1 changed files with 3 additions and 2 deletions

View File

@ -31,11 +31,11 @@ public:
} }
void add(int val) { void add(int val) {
if (arrlen == MAX_KEYER_QUEUE-1) { if (arrlen == MAX_KEYER_QUEUE) {
return; return;
} }
for (int i = 0; i < arrlen; i++) { for (int i = 0; i < arrlen; i++) {
if (arr[arrlen] == val) { if (arr[i] == val) {
return; return;
} }
} }
@ -382,6 +382,7 @@ IambicBKeyer iambicBKeyer = IambicBKeyer();
KeyaheadKeyer keyaheadKeyer = KeyaheadKeyer(); KeyaheadKeyer keyaheadKeyer = KeyaheadKeyer();
Keyer *keyers[] = { Keyer *keyers[] = {
NULL,
&straightKeyer, &straightKeyer,
&bugKeyer, &bugKeyer,
&elBugKeyer, &elBugKeyer,