mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-19 12:39:11 +00:00
Fix: Protect against a few out of bounds or uninitialised usage errors
This commit is contained in:
@@ -371,7 +371,10 @@ static bool CompareFiles(const char *n1, const char *n2)
|
||||
if (f2 == NULL) return false;
|
||||
|
||||
FILE *f1 = fopen(n1, "rb");
|
||||
if (f1 == NULL) error("can't open %s", n1);
|
||||
if (f1 == NULL) {
|
||||
fclose(f2);
|
||||
error("can't open %s", n1);
|
||||
}
|
||||
|
||||
size_t l1, l2;
|
||||
do {
|
||||
|
Reference in New Issue
Block a user