From b128f2a43a16acef50de045ae6526772c04c395e Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Tue, 4 Mar 2025 22:46:52 +0000 Subject: New upstream version 6.0.24.66+repack --- AGWAPI.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'AGWAPI.c') diff --git a/AGWAPI.c b/AGWAPI.c index bf4c7da..dcf3494 100644 --- a/AGWAPI.c +++ b/AGWAPI.c @@ -1142,6 +1142,7 @@ int ProcessAGWCommand(struct AGWSocketConnectionInfo * sockptr) int con,conport; int AGWYReply = 0; int state, change; + int n; // if we have hidden some ports then the port in the AGW packet will be an index into the visible ports, // not the real port number @@ -1196,7 +1197,7 @@ int ProcessAGWCommand(struct AGWSocketConnectionInfo * sockptr) conport=GetPortNumber(VisiblePortToRealPort[key[0]-48]); - sprintf(ConnectMsg,"C %d %s",conport,ToCall); + n = sprintf(ConnectMsg,"C %d %s",conport,ToCall); // if 'v' command add digis @@ -1211,7 +1212,7 @@ int ProcessAGWCommand(struct AGWSocketConnectionInfo * sockptr) while(nDigis--) { - sprintf(ConnectMsg, "%s, %s", ConnectMsg, Digis); + n += sprintf(&ConnectMsg[n], " %s", Digis); Digis += 10; } } -- cgit v1.2.3