From 29964c8ea3187580927a887f60b3dd8783d93e6e Mon Sep 17 00:00:00 2001 From: liuf9 Date: Mon, 13 Oct 2025 21:17:35 +0800 Subject: [PATCH] bugfix for substr in lite utils --- .../minddata/dataset/kernels/image/dvpp/utils/AclLiteUtils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore-lite/minddata/dataset/kernels/image/dvpp/utils/AclLiteUtils.cc b/mindspore-lite/minddata/dataset/kernels/image/dvpp/utils/AclLiteUtils.cc index 76a0ab8c..88be2dae 100644 --- a/mindspore-lite/minddata/dataset/kernels/image/dvpp/utils/AclLiteUtils.cc +++ b/mindspore-lite/minddata/dataset/kernels/image/dvpp/utils/AclLiteUtils.cc @@ -480,7 +480,7 @@ bool AnalyseLine(const std::string &line, std::string &key, std::string &value) } end_pos = pos - 1; } - std::string new_line = line.substr(start_pos, start_pos + 1 - end_pos); // delete comment + std::string new_line = line.substr(start_pos, end_pos - start_pos + 1); // delete comment pos = new_line.find(EQUALS_CHAR); if (pos == std::string::npos) { // has no = return false; -- Gitee