Make shell() obey MaxStringLen

This commit is contained in:
Dianne Skoll
2022-01-22 18:24:38 -05:00
parent 9fd8b0f890
commit 8d7f9bcb8b
3 changed files with 15 additions and 4 deletions
+1 -1
View File
@@ -828,7 +828,7 @@ static int Add(void)
v3.type = STR_TYPE;
l1 = strlen(v1.v.str);
l2 = strlen(v2.v.str);
if (MaxStringLen && (l1 + l2 > (size_t) MaxStringLen)) {
if (MaxStringLen > 0 && (l1 + l2 > (size_t) MaxStringLen)) {
DestroyValue(v1); DestroyValue(v2);
return E_STRING_TOO_LONG;
}