Fix an issue with hashing compound callsigns with prefixes shorter than 3 characters

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7044 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2016-08-29 17:02:16 +00:00
parent e7ecd5f5b3
commit c2c982dba9

View File

@ -149,7 +149,7 @@ int unpackgrid( int32_t ngrid, char *grid)
int unpackpfx( int32_t nprefix, char *call)
{
char nc, pfx[4]="", tmpcall[7]="";
char nc, pfx[4]={'\0'}, tmpcall[7];
int i;
int32_t n;
@ -171,7 +171,8 @@ int unpackpfx( int32_t nprefix, char *call)
n=n/37;
}
strcpy(call,pfx);
char * p = strrchr(pfx,' ');
strcpy(call, p ? p + 1 : pfx);
strncat(call,"/",1);
strncat(call,tmpcall,strlen(tmpcall));