mirror of https://github.com/OpenTTD/OpenTTD
(svn r16748) -Codechange: Don't cast away constness.
parent
e1a26058e9
commit
abd37177f2
|
@ -572,13 +572,15 @@ public:
|
||||||
|
|
||||||
Md5 checksum;
|
Md5 checksum;
|
||||||
uint8 buffer[1024];
|
uint8 buffer[1024];
|
||||||
|
char basename[MAX_PATH]; ///< \a filename without the extension.
|
||||||
size_t len, size;
|
size_t len, size;
|
||||||
|
|
||||||
/* open the scenario file, but first get the name.
|
/* open the scenario file, but first get the name.
|
||||||
* This is safe as we check on extension which
|
* This is safe as we check on extension which
|
||||||
* must always exist. */
|
* must always exist. */
|
||||||
*(char *)strrchr(filename, '.') = '\0';
|
strecpy(basename, filename, lastof(basename));
|
||||||
f = FioFOpenFile(filename, "rb", SCENARIO_DIR, &size);
|
*strrchr(basename, '.') = '\0';
|
||||||
|
f = FioFOpenFile(basename, "rb", SCENARIO_DIR, &size);
|
||||||
if (f == NULL) return false;
|
if (f == NULL) return false;
|
||||||
|
|
||||||
/* calculate md5sum */
|
/* calculate md5sum */
|
||||||
|
|
Loading…
Reference in New Issue