mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Simplify string copy by using strlcpy().
This commit is contained in:
@@ -184,12 +184,10 @@ fstk_AddIncludePath(char *s)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen(s) > _MAX_PATH) {
|
if (strlcpy(IncludePaths[NextIncPath++], s, _MAX_PATH) >= _MAX_PATH) {
|
||||||
fatalerror("Include path too long '%s'",s);
|
fatalerror("Include path too long '%s'",s);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(IncludePaths[NextIncPath++], s);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE *
|
FILE *
|
||||||
|
|||||||
Reference in New Issue
Block a user