diff --git a/src/bin/jbc2mpl b/src/bin/jbc2mpl index 4bba43c9b7cbc1a3a3fe757b2cffd759af6c603a..fe7befca06590b3ecfb1e6c7fe367fd896521665 100755 Binary files a/src/bin/jbc2mpl and b/src/bin/jbc2mpl differ diff --git a/src/bin/maple b/src/bin/maple index 87a51ec8d19571ebbe02704798b5ff91fa008677..88f93deb94303afbb124c40a9358c5426040eda0 100755 Binary files a/src/bin/maple and b/src/bin/maple differ diff --git a/src/deplibs/libmplutil.a b/src/deplibs/libmplutil.a index cbee045db01565b850160591652763d5d734487d..0b6eaba3f94a9a52025b669e707c9d108d09dac4 100644 Binary files a/src/deplibs/libmplutil.a and b/src/deplibs/libmplutil.a differ diff --git a/src/mplfe/common/include/basic_io.h b/src/mplfe/common/include/basic_io.h index fac70d6f65e3ea10ac207d8eecef44d7ce712c31..90d7e836ec8b5f5d482f9083d0e340fb2b5b248f 100644 --- a/src/mplfe/common/include/basic_io.h +++ b/src/mplfe/common/include/basic_io.h @@ -180,6 +180,12 @@ class BasicIORead { return file.GetPtrOffset(pos0); } + const uint8 *GetSafeDataAt(uint32 offset) const { + CHECK_FATAL(0 < offset && offset < file.GetLength(), "Invalid offset: 0x%x, file total size: 0x%x", + offset, file.GetLength()); + return file.GetPtrOffset(offset); + } + uint32 GetPos() const { return pos; } diff --git a/src/mplfe/common/src/basic_io.cpp b/src/mplfe/common/src/basic_io.cpp index a21e25f5822d5265cc6d8616912403f492fe4be6..9d3568e2720b67c5dab846a479471760bf7d3d64 100644 --- a/src/mplfe/common/src/basic_io.cpp +++ b/src/mplfe/common/src/basic_io.cpp @@ -38,7 +38,7 @@ bool BasicIOMapFile::OpenAndMap() { fd = -1; fd = open(fileName.c_str(), O_RDONLY); if (fd < 0) { - FATAL(kLncFatal, "Unable to open %s.\nError %d in open()", fileName.c_str(), errno); + ERR(kLncErr, "Unable to open %s.\nError %d in open()", fileName.c_str(), errno); return false; } long start = lseek(fd, 0L, SEEK_SET);