Fix crash when length is negative

This commit is contained in:
Connor Nelson
2021-03-23 12:47:49 -07:00
committed by GitHub
parent 364acef42e
commit 94000c669a

View File

@@ -103,7 +103,7 @@ static void Ap_join(js_State *J)
seplen = 1; seplen = 1;
} }
if (len == 0) { if (len <= 0) {
js_pushliteral(J, ""); js_pushliteral(J, "");
return; return;
} }