Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Schematics: Error if unable to open file
- Loading branch information
Showing
with
5 additions
and
0 deletions.
-
+5
−0
src/mg_schematic.cpp
|
@@ -207,6 +207,11 @@ bool Schematic::loadSchematicFromFile(const char *filename, INodeDefManager *nde |
|
|
bool have_cignore = false; |
|
|
|
|
|
std::ifstream is(filename, std::ios_base::binary); |
|
|
if (!is.good()) { |
|
|
errorstream << "loadSchematicFile: unable to open file '" |
|
|
<< filename << "'" << std::endl; |
|
|
return false; |
|
|
} |
|
|
|
|
|
u32 signature = readU32(is); |
|
|
if (signature != MTSCHEM_FILE_SIGNATURE) { |
|
|