GH-895: Remove use of Variable-Length-Arrays

This commit is contained in:
Jon Siwek 2020-04-15 16:25:21 -07:00
parent 991501a3d2
commit 15a19414ca
11 changed files with 28 additions and 20 deletions

View file

@ -565,7 +565,8 @@ int dbg_execute_command(const char* cmd)
delete [] localcmd;
// Make sure we know this op name.
const char* matching_cmds[num_debug_cmds()];
auto matching_cmds_buf = std::make_unique<const char*[]>(num_debug_cmds());
auto matching_cmds = matching_cmds_buf.get();
int num_matches = find_all_matching_cmds(opstring, matching_cmds);
if ( ! num_matches )