1
0
mirror of https://github.com/simh/simh.git synced 2026-02-02 06:42:18 +00:00

SCP: Cleanup gcc compiler flagged potential issues

Compiler warnings about undeclared case fall throughs, and potential
buffer overruns,
This commit is contained in:
Mark Pizzolato
2019-01-21 16:43:17 -08:00
parent 3cca0cf90b
commit cb9876ce65
5 changed files with 17 additions and 10 deletions

View File

@@ -889,7 +889,8 @@ if ((hFind = FindFirstFileA (cptr, &File)) != INVALID_HANDLE_VALUE) {
sprintf (&DirName[strlen (DirName)], "%c", *pathsep);
do {
FileSize = (((t_int64)(File.nFileSizeHigh)) << 32) | File.nFileSizeLow;
sprintf (FileName, "%s%s", DirName, File.cFileName);
strlcpy (FileName, DirName, sizeof (FileName));
strlcat (FileName, File.cFileName, sizeof (FileName));
stat (FileName, &filestat);
entry (DirName, File.cFileName, FileSize, &filestat, context);
} while (FindNextFile (hFind, &File));