summaryrefslogtreecommitdiff
path: root/tools/preproc/charmap.cpp
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-05-20 11:45:24 -0700
committerYamaArashi <shadow962@live.com>2016-05-21 10:35:53 -0700
commitc0203de808a98d27446e01c6b7e9f9311a5ad3bf (patch)
treee538179372ce7cddc50b851e4c24a4c7e0a40c81 /tools/preproc/charmap.cpp
parent4af578c1865e4b620f4c64401e0a16ccbd9efc8d (diff)
sprite.c and updated preproc
Diffstat (limited to 'tools/preproc/charmap.cpp')
-rw-r--r--tools/preproc/charmap.cpp3
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);