From fe0e8bea3432b8a5f8f594b4d2b9cfdefb9b478e Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Fri, 8 Mar 2024 09:04:29 +1300 Subject: [PATCH] Use a valid `SupportedArch` for default-initialized `Registers` to avoid undefined behavior --- src/Registers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Registers.h b/src/Registers.h index eaac7ea6a80..49f01f61182 100644 --- a/src/Registers.h +++ b/src/Registers.h @@ -55,7 +55,7 @@ class Registers { public: enum { MAX_SIZE = 16 }; - Registers(SupportedArch a = SupportedArch(-1)) : arch_(a) { + Registers(SupportedArch a = x86) : arch_(a) { memset(&u, 0, sizeof(u)); }