From f7bbf3e7cd073419395ec286a61fdaaea415231b Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Sat, 6 Jul 2024 05:21:29 +0200 Subject: [PATCH] test --- crnlib/crn_packed_uint.h | 2 +- inc/crn_defs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crnlib/crn_packed_uint.h b/crnlib/crn_packed_uint.h index df55e6b4..dedca4ae 100644 --- a/crnlib/crn_packed_uint.h +++ b/crnlib/crn_packed_uint.h @@ -39,7 +39,7 @@ struct packed_uint { } inline operator unsigned int() const { - switch (sizeof(m_buf)) { + switch (sizeof(m_buf) / sizeof(m_buf[0])) { case 1: return m_buf[0]; case 2: diff --git a/inc/crn_defs.h b/inc/crn_defs.h index 0f41c0eb..0a457ccb 100644 --- a/inc/crn_defs.h +++ b/inc/crn_defs.h @@ -225,7 +225,7 @@ struct crn_packed_uint { } inline operator unsigned int() const { - switch (sizeof(m_buf)) { + switch (sizeof(m_buf) / sizeof(m_buf[0])) { case 1: return m_buf[0]; case 2: