From 9eb95b8c3ade0f5d96574c00ce661fd22ef1b715 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leon=20Wei=C3=9F?= <leon.weiss@rub.de>
Date: Fri, 20 Oct 2023 08:33:40 +0200
Subject: [PATCH] Replace assert with useful and recoverable exception

---
 irdb-libs/libIRDB-core/src/operand_csx86.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/irdb-libs/libIRDB-core/src/operand_csx86.cpp b/irdb-libs/libIRDB-core/src/operand_csx86.cpp
index 986befb9d..73574862b 100644
--- a/irdb-libs/libIRDB-core/src/operand_csx86.cpp
+++ b/irdb-libs/libIRDB-core/src/operand_csx86.cpp
@@ -178,7 +178,7 @@ static uint32_t to_reg_number(const x86_reg &reg)
 			return 15;
 		default: break;
 	}
-	assert(0);
+	throw std::invalid_argument("Not a register with an associated register number");
 }
 
 // methods
-- 
GitLab