mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Remove dependency of strlcpy()
There was only one place where `strlcpy` was still used. Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
#include "asm/symbol.h"
|
||||
|
||||
#include "extern/err.h"
|
||||
#include "extern/strl.h"
|
||||
|
||||
#include "types.h"
|
||||
|
||||
@@ -226,8 +225,12 @@ void fstk_AddIncludePath(char *s)
|
||||
if (NextIncPath == MAXINCPATHS)
|
||||
fatalerror("Too many include directories passed from command line");
|
||||
|
||||
if (strlcpy(IncludePaths[NextIncPath++], s, _MAX_PATH) >= _MAX_PATH)
|
||||
if (strlen(s) >= sizeof(IncludePaths[0]))
|
||||
fatalerror("Include path too long '%s'", s);
|
||||
|
||||
strncpy(IncludePaths[NextIncPath], s, sizeof(IncludePaths[0]));
|
||||
|
||||
NextIncPath++;
|
||||
}
|
||||
|
||||
FILE *fstk_FindFile(char *fname)
|
||||
|
||||
Reference in New Issue
Block a user