From 60b8d904c2cb98ca45db0fa1993c1433d8e76c8e Mon Sep 17 00:00:00 2001 From: Tony Butler Date: Wed, 29 May 2024 10:10:24 -0600 Subject: [PATCH] flex: fix compilation error with MSVC 2022 --- src/crypto/flex/flex.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/crypto/flex/flex.cpp b/src/crypto/flex/flex.cpp index d6f2d1a3..8a96a73a 100644 --- a/src/crypto/flex/flex.cpp +++ b/src/crypto/flex/flex.cpp @@ -78,7 +78,7 @@ static void getAlgoString(void *mem, unsigned int size, uint8_t* selectedAlgoOut unsigned char *p = (unsigned char *)mem; unsigned int len = size/2; unsigned char j = 0; - bool selectedAlgo[algoCount]; + bool* selectedAlgo = new bool[algoCount]; for(int z=0; z < algoCount; z++) { selectedAlgo[z] = false; } @@ -97,6 +97,7 @@ static void getAlgoString(void *mem, unsigned int size, uint8_t* selectedAlgoOut } } } + delete [] selectedAlgo; } void print_hex_memory(void *mem, unsigned int size) {