Skip to content

Commit

Permalink
Fix empty MatrixU8 creation attempting zero-allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Feb 15, 2024
1 parent 194d674 commit ea70f86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyhmmer/easel.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2859,7 +2859,7 @@ cdef class MatrixU8(Matrix):

# allocate the buffer
m_alloc = 1 if self._m == 0 else self._m
self._data = <void**> calloc(self._m, sizeof(uint8_t*))
self._data = <void**> calloc(m_alloc, sizeof(uint8_t*))
if self._data == NULL:
raise AllocationError("uint8_t*", sizeof(uint8_t*), m_alloc)
# allocate the data array
Expand Down

0 comments on commit ea70f86

Please sign in to comment.