EDACS 32-bit Variable Fix;

This commit is contained in:
lwvmobile 2023-01-05 16:27:44 -05:00
parent bb2199ee84
commit c44e039772
2 changed files with 9 additions and 7 deletions

View File

@ -480,7 +480,8 @@ decode_bch()
}
}
long int messagepp = 0x0;
//bugfix on 32-bit cygwin, probably overflowed here
unsigned long long int messagepp = 0x0;
//very simplified version, just to encode, get frame and compare
unsigned long long int edacs_bch (unsigned long long int message)

View File

@ -47,12 +47,13 @@ char * getTimeE(void) //get pretty hh:mm:ss timestamp
void edacs(dsd_opts * opts, dsd_state * state)
{
unsigned long long fr_1 = 0xFFFFFFFFFF; //40-bit frames
unsigned long long fr_2 = 0; //each is a 40 bit frame that repeats 3 times
unsigned long long fr_3 = 0; //two messages per frame
unsigned long long fr_4 = 0xFFFFFFFFFF;
unsigned long long fr_5 = 0;
unsigned long long fr_6 = 0;
//changed to ulli here for 32-bit cygwin (not sure if was an issue, but playing it safe)
unsigned long long int fr_1 = 0xFFFFFFFFFF; //40-bit frames
unsigned long long int fr_2 = 0; //each is a 40 bit frame that repeats 3 times
unsigned long long int fr_3 = 0; //two messages per frame
unsigned long long int fr_4 = 0xFFFFFFFFFF;
unsigned long long int fr_5 = 0;
unsigned long long int fr_6 = 0;
//BCH stuff
unsigned long long int fr_1m = 0xFFFFFFF; //28-bit 7X message portion to pass to bch handler