diff options
author | Yotam Barnoy | 2010-10-31 11:08:43 +0000 |
---|---|---|
committer | Yotam Barnoy | 2010-10-31 11:08:43 +0000 |
commit | 94c8d0a14df429a1b25bd9f5c5d75497fd0ddbd1 (patch) | |
tree | 3df2a4ae7967c56d464729669fc06ce4e93dff36 /tools/skycpt/TextFile.cpp | |
parent | 8df4278ba8cfbf71228e1927f9db635a9a30a57f (diff) | |
parent | dca3c8d8bfc6c4db38cf8e8291818dd472041d4e (diff) | |
download | scummvm-rg350-94c8d0a14df429a1b25bd9f5c5d75497fd0ddbd1.tar.gz scummvm-rg350-94c8d0a14df429a1b25bd9f5c5d75497fd0ddbd1.tar.bz2 scummvm-rg350-94c8d0a14df429a1b25bd9f5c5d75497fd0ddbd1.zip |
Updated with latest from trunk
svn-id: r53976
Diffstat (limited to 'tools/skycpt/TextFile.cpp')
-rw-r--r-- | tools/skycpt/TextFile.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/skycpt/TextFile.cpp b/tools/skycpt/TextFile.cpp index 92d747f955..ee64d22f5f 100644 --- a/tools/skycpt/TextFile.cpp +++ b/tools/skycpt/TextFile.cpp @@ -28,13 +28,14 @@ TextFile::TextFile(const char *name) { FILE *inf = fopen(name, "r"); + _lines = NULL; if (!inf) { printf("Unable to open file %s\n", name); getchar(); + } else { + read(inf); + fclose(inf); } - _lines = NULL; - read(inf); - fclose(inf); } uint32 crop(char *line) { |