Skip to content

Commit f7bbf3e

Browse files
committed
test
1 parent c387d2a commit f7bbf3e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crnlib/crn_packed_uint.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct packed_uint {
3939
}
4040

4141
inline operator unsigned int() const {
42-
switch (sizeof(m_buf)) {
42+
switch (sizeof(m_buf) / sizeof(m_buf[0])) {
4343
case 1:
4444
return m_buf[0];
4545
case 2:

inc/crn_defs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ struct crn_packed_uint {
225225
}
226226

227227
inline operator unsigned int() const {
228-
switch (sizeof(m_buf)) {
228+
switch (sizeof(m_buf) / sizeof(m_buf[0])) {
229229
case 1:
230230
return m_buf[0];
231231
case 2:

0 commit comments

Comments
 (0)