From c67076cd2a066011c61ee7a5ea1aa4b20a45b9db Mon Sep 17 00:00:00 2001 From: Fred Chow Date: Wed, 5 May 2021 18:17:33 -0700 Subject: [PATCH] fixed an inaccurate assertion --- src/mapleall/maple_ir/src/bin_mpl_import.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mapleall/maple_ir/src/bin_mpl_import.cpp b/src/mapleall/maple_ir/src/bin_mpl_import.cpp index 7b9d6f0205..0840f5932a 100644 --- a/src/mapleall/maple_ir/src/bin_mpl_import.cpp +++ b/src/mapleall/maple_ir/src/bin_mpl_import.cpp @@ -1021,7 +1021,7 @@ PUIdx BinaryMplImport::ImportFunction() { mod.SetCurFunction(nullptr); return 0; } else if (tag < 0) { - CHECK_FATAL(static_cast(-tag) < funcTab.size(), "index out of bounds"); + CHECK_FATAL(-tag <= funcTab.size(), "index out of bounds"); if (-tag == funcTab.size()) { // function was exported before its symbol return (PUIdx)0; } -- Gitee