diff --git a/HEZON_ITK/bs_sap.cpp b/HEZON_ITK/bs_sap.cpp index 3365dd3..4a11967 100644 --- a/HEZON_ITK/bs_sap.cpp +++ b/HEZON_ITK/bs_sap.cpp @@ -214,8 +214,8 @@ void get_bom(System::Collections::Generic::List (index + 3)) { - quantity = quantity.substr(0, index + 3); + if(index!=-1&&quantity.length()>(index + 4)) + { quantity = quantity.substr(0,index + 4); } } else { AOM_ask_value_string(lines[j], "bl_quantity", &val);