summaryrefslogtreecommitdiff
path: root/Build/source/texk/xdvik/gui
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/xdvik/gui')
-rw-r--r--Build/source/texk/xdvik/gui/sfPath.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Build/source/texk/xdvik/gui/sfPath.c b/Build/source/texk/xdvik/gui/sfPath.c
index 2b225a26bdb..421a8631bb1 100644
--- a/Build/source/texk/xdvik/gui/sfPath.c
+++ b/Build/source/texk/xdvik/gui/sfPath.c
@@ -199,13 +199,17 @@ SFreplaceText(SFDir *dir, char *str)
{
int len;
- *(dir->path) = 0;
+ *(dir->path) = '\0';
len = strlen(str);
+
if (str[len - 1] == '/') {
(void)strcat(SFcurrentPath, str);
}
else {
- (void)strncat(SFcurrentPath, str, len - 1);
+ char *p = SFcurrentPath + strlen(SFcurrentPath);
+
+ (void)memcpy(p, str, len - 1);
+ p[len - 1] = '\0';
}
/* if (strncmp(SFcurrentPath, SFstartDir, strlen(SFstartDir))) { */
/* SFsetText(SFcurrentPath); */