summaryrefslogtreecommitdiff
path: root/APRSCode.c
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2025-03-04 22:46:52 +0000
committerDave Hibberd <hibby@debian.org>2025-03-04 22:46:52 +0000
commitb128f2a43a16acef50de045ae6526772c04c395e (patch)
tree77971053f1ab7355621a01f0f58c44b6d722c6a3 /APRSCode.c
parentc858986248f9ee86835be732f413824c0e42d729 (diff)
New upstream version 6.0.24.66+repackupstream/6.0.24.66+repack
Diffstat (limited to 'APRSCode.c')
-rw-r--r--APRSCode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/APRSCode.c b/APRSCode.c
index 7255c7a..2ee3b5f 100644
--- a/APRSCode.c
+++ b/APRSCode.c
@@ -553,6 +553,8 @@ int APRSWriteLog(char * msg)
UCHAR Value[MAX_PATH];
time_t T;
struct tm * tm;
+ int n;
+
if (LogAPRSIS == 0)
return 0;
@@ -574,8 +576,9 @@ int APRSWriteLog(char * msg)
strcat(Value, "logs/APRS_");
}
- sprintf(Value, "%s%02d%02d%02d.log", Value,
- tm->tm_year - 100, tm->tm_mon+1, tm->tm_mday);
+ n = strlen(Value);
+
+ sprintf(&Value[n], "%02d%02d%02d.log", tm->tm_year - 100, tm->tm_mon+1, tm->tm_mday);
if ((file = fopen(Value, "ab")) == NULL)
return FALSE;