From 05a08d61c738472c9a49d973b62e10be3d6b1118 Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 29 Sep 2010 02:57:11 +0000 Subject: TOOLS : Fixes for skycpt use, particularly on case-sensitive OS In order to allow for work on bug #1507756 "BASS: Officer Blunt wrong animation (?)", the skycpt tool needs to be run, but this was only previously used on case-insensitive OS i.e. Win32. To get this to work normally on case-sensitive OS i.e. Unix, a number of corrections were made to the hardcoded filenames to ensure the same case as the input files. Minor corrections : The README was also amended to deal with the pitfall of decompressing savefiles. Added output of each RESET.* file as processed so offending file can be seen on assertion. Corrected segfault on missing COMPACT.TXT, so exit is more graceful. svn-id: r52941 --- tools/skycpt/TextFile.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tools/skycpt/TextFile.cpp') 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) { -- cgit v1.2.3