diff options
author | YamaArashi <shadow962@live.com> | 2016-05-20 11:45:24 -0700 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2016-05-21 10:35:53 -0700 |
commit | c0203de808a98d27446e01c6b7e9f9311a5ad3bf (patch) | |
tree | e538179372ce7cddc50b851e4c24a4c7e0a40c81 /tools/preproc/charmap.cpp | |
parent | 4af578c1865e4b620f4c64401e0a16ccbd9efc8d (diff) |
sprite.c and updated preproc
Diffstat (limited to 'tools/preproc/charmap.cpp')
-rw-r--r-- | tools/preproc/charmap.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/preproc/charmap.cpp b/tools/preproc/charmap.cpp index 573981694..a7bedfe26 100644 --- a/tools/preproc/charmap.cpp +++ b/tools/preproc/charmap.cpp @@ -76,6 +76,9 @@ CharmapReader::CharmapReader(std::string filename) : m_filename(filename) m_size = std::ftell(fp); + if (m_size < 0) + FATAL_ERROR("File size of \"%s\" is less than zero.\n", filename.c_str()); + m_buffer = new char[m_size + 1]; std::rewind(fp); |