launch: fix use after free of command options

This commit is contained in:
outfoxxed 2024-11-11 22:01:08 -08:00
parent b528be9426
commit 74f371850d
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
2 changed files with 18 additions and 14 deletions

View file

@ -1,5 +1,6 @@
#pragma once
#include <memory>
#include <string>
#include <CLI/App.hpp>
@ -26,6 +27,7 @@ private:
};
struct CommandState {
std::unique_ptr<CLI::App> app;
struct {
int argc = 0;
char** argv = nullptr;