Commit 9c33f4f4 authored by Harris Hancock's avatar Harris Hancock

Use KJ_STACK_ARRAY instead of VLA

For now, I'm just guessing on appropriate values for minStack and
maxStack.
parent 3bd55855
......@@ -58,7 +58,8 @@ public:
if (amount == 0 || canPrintAllInline(items, kind)) {
return kj::StringTree(kj::mv(items), ", ");
} else {
char delim[amount * 2 + 3];
KJ_STACK_ARRAY(char, delimArrayPtr, amount * 2 + 3, 32, 256);
auto delim = delimArrayPtr.begin();
delim[0] = ',';
delim[1] = '\n';
memset(delim + 2, ' ', amount * 2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment