parent
21d8642186
commit
c5d07a5407
|
@ -24,7 +24,11 @@ int main(int argc, char **argv)
|
|||
GAMEMAP *map;
|
||||
char filename[PATH_MAX], *delim;
|
||||
|
||||
fscanf(fp, "%256s\n", filename);
|
||||
if (fscanf(fp, "%254s\n", filename) != 1)
|
||||
{
|
||||
fprintf(stderr, "maptest: Couldn't fscanf maplist.txt.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Strip "/game.map"
|
||||
delim = strrchr(filename, '/');
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#ifndef WIN32
|
||||
#include <stdbool.h>
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
typedef int bool;
|
||||
#define PATH_MAX 255
|
||||
|
@ -228,6 +229,7 @@ static void check_pie(const char *input)
|
|||
}
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
@ -245,7 +247,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
char filename[PATH_MAX];
|
||||
|
||||
fscanf(fp, "%256s\n", filename);
|
||||
if (fscanf(fp, "%254s\n", filename) != 1)
|
||||
{
|
||||
fprintf(stderr, "%s: Failed to read filename\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
printf("Testing model: %s\n", filename);
|
||||
strcpy(fullpath, datapath);
|
||||
strcat(fullpath, filename);
|
||||
|
|
|
@ -21,7 +21,11 @@ int main(int argc, char **argv)
|
|||
|
||||
while (!feof(fp))
|
||||
{
|
||||
fscanf(fp, "%256s\n", filename);
|
||||
if (fscanf(fp, "%254s\n", filename) != 1)
|
||||
{
|
||||
fprintf(stderr, "%s: Failed to fscanf jslist.txt.\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
printf("Testing script: %s\n", filename);
|
||||
strcpy(fullpath, datapath);
|
||||
strcat(fullpath, filename);
|
||||
|
|
Loading…
Reference in New Issue