Simplify string copy by using strlcpy().

This commit is contained in:
Anthony J. Bentley
2017-01-24 01:26:15 -07:00
parent efaa6d9ff7
commit dc4a98048d

View File

@@ -184,12 +184,10 @@ fstk_AddIncludePath(char *s)
return;
}
if (strlen(s) > _MAX_PATH) {
if (strlcpy(IncludePaths[NextIncPath++], s, _MAX_PATH) >= _MAX_PATH) {
fatalerror("Include path too long '%s'",s);
return;
}
strcpy(IncludePaths[NextIncPath++], s);
}
FILE *