aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorPaweł Kołodziejski2002-10-22 20:40:51 +0000
committerPaweł Kołodziejski2002-10-22 20:40:51 +0000
commit3c2a409b11e727c0e990de12a67a5a9c0deb85c2 (patch)
treecec547f889fdcc962fd015e8b1117f427480b2ca /common
parent7f9abfd83913f2fe03d337bb3f5b006dc52b0c57 (diff)
downloadscummvm-rg350-3c2a409b11e727c0e990de12a67a5a9c0deb85c2.tar.gz
scummvm-rg350-3c2a409b11e727c0e990de12a67a5a9c0deb85c2.tar.bz2
scummvm-rg350-3c2a409b11e727c0e990de12a67a5a9c0deb85c2.zip
cleanup array
svn-id: r5250
Diffstat (limited to 'common')
-rw-r--r--common/file.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/common/file.cpp b/common/file.cpp
index bc95d4a212..665466beea 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -41,14 +41,14 @@ FILE *File::fopenNoCase(const char *filename, const char * directory, const char
if (file)
return file;
- char dirs[7][10];
- dirs[0][0] = 0;
- strcpy(dirs[1], "video/");
- strcpy(dirs[2], "VIDEO/");
- strcpy(dirs[3], "data/");
- strcpy(dirs[4], "DATA/");
- strcpy(dirs[5], "resource/");
- strcpy(dirs[6], "RESOURCE/");
+ struct t_dirs {
+ char dir[20];
+ } dirs[] = {
+ "",
+ "video/", "VIDEO/",
+ "data/", "DATA/",
+ "resource/", "RESOURCE/"
+ };
for (uint8 l = 0; l < 7; l++) {
strcpy(buf, directory);
@@ -59,7 +59,7 @@ FILE *File::fopenNoCase(const char *filename, const char * directory, const char
#endif
strcat(buf, "/");
}
- strcat(buf, dirs[l]);
+ strcat(buf, dirs[l].dir);
int8 len = strlen(buf);
strcat(buf, filename);