From 538f8149054275c5a71740536dac1b57eb957b20 Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Fri, 16 Sep 2016 19:38:18 +0000 Subject: [PATCH] Fix a bug in wspr callsign packing that affected wsprsim and signal subtraction for a subset of callsigns. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7090 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/wsprd/wsprd_utils.c | 4 ++-- lib/wsprd/wsprsim_utils.c | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/wsprd/wsprd_utils.c b/lib/wsprd/wsprd_utils.c index 1505bcd3f..974dd34e2 100644 --- a/lib/wsprd/wsprd_utils.c +++ b/lib/wsprd/wsprd_utils.c @@ -74,7 +74,7 @@ int unpackcall( int32_t ncall, char *call ) int32_t n; int i; char tmp[7]; - + n=ncall; strcpy(call,"......"); if (n < 262177560 ) { @@ -251,7 +251,7 @@ int unpk_(signed char *message, char *hashtab, char *call_loc_pow, char *callsig int ntype = (n2&127) - 64; callsign[12]=0; grid[4]=0; - + /* Based on the value of ntype, decide whether this is a Type 1, 2, or 3 message. diff --git a/lib/wsprd/wsprsim_utils.c b/lib/wsprd/wsprsim_utils.c index 49a118c03..ac107320a 100644 --- a/lib/wsprd/wsprsim_utils.c +++ b/lib/wsprd/wsprsim_utils.c @@ -41,7 +41,7 @@ long unsigned int pack_grid4_power(char *grid4, int power) { } long unsigned int pack_call(char *callsign) { - int i; + unsigned int i; long unsigned int n; char call6[6]; memset(call6,32,sizeof(char)*6); @@ -51,7 +51,7 @@ long unsigned int pack_call(char *callsign) { return 0; } if( isdigit(*(callsign+2)) ) { - for (i=0; i<6; i++) { + for (i=0; i