summaryrefslogtreecommitdiff
path: root/lib/wsprd/wsprd_utils.c
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2020-05-11 22:17:58 +0200
committerChristoph Berg <myon@debian.org>2020-05-11 22:17:58 +0200
commit32a41b1abe1a4aab0892c9c2051be6ba5b379f1e (patch)
treec6e107c1ee4d70610e43a7912e57c720334a08c7 /lib/wsprd/wsprd_utils.c
parent08299e8b2bf50ba90daf570f57def529dd29d6e7 (diff)
New upstream version 2.2.0~rc1+repackupstream/2.2.0_rc1+repack
Diffstat (limited to 'lib/wsprd/wsprd_utils.c')
-rw-r--r--lib/wsprd/wsprd_utils.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/wsprd/wsprd_utils.c b/lib/wsprd/wsprd_utils.c
index 65485d4b..5a1d4974 100644
--- a/lib/wsprd/wsprd_utils.c
+++ b/lib/wsprd/wsprd_utils.c
@@ -240,7 +240,7 @@ int floatcomp(const void* elem1, const void* elem2)
return *(const float*)elem1 > *(const float*)elem2;
}
-int unpk_(signed char *message, char *hashtab, char *call_loc_pow, char *callsign)
+int unpk_(signed char *message, char *hashtab, char *loctab, char *call_loc_pow, char *callsign)
{
int n1,n2,n3,ndbm,ihash,nadd,noprint=0;
char grid[5],grid6[7],cdbm[3];
@@ -279,6 +279,7 @@ int unpk_(signed char *message, char *hashtab, char *call_loc_pow, char *callsig
strncat(call_loc_pow,"\0",1);
ihash=nhash(callsign,strlen(callsign),(uint32_t)146);
strcpy(hashtab+ihash*13,callsign);
+ strcpy(loctab+ihash*5,grid);
} else {
nadd=nu;
if( nu > 3 ) nadd=nu-3;
@@ -312,8 +313,8 @@ int unpk_(signed char *message, char *hashtab, char *call_loc_pow, char *callsig
// not testing 4'th and 5'th chars because of this case: <PA0SKT/2> JO33 40
// grid is only 4 chars even though this is a hashed callsign...
// isalpha(grid6[4]) && isalpha(grid6[5]) ) ) {
- noprint=1;
- }
+ noprint=1;
+ }
ihash=(n2-ntype-64)/128;
if( strncmp(hashtab+ihash*13,"\0",1) != 0 ) {