Skip to content

Commit 8dfb789

Browse files
committed
fix incorrect MAX_STRING_SIZE calculation
1 parent caca084 commit 8dfb789

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stringdtype/stringdtype/src/static_string.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extern const npy_packed_static_string *NPY_EMPTY_STRING;
2222
extern const npy_packed_static_string *NPY_NULL_STRING;
2323

2424
// one byte in size is reserved for flags and small string optimization
25-
#define NPY_MAX_STRING_SIZE (1 << (sizeof(size_t) - 1)) - 1
25+
#define NPY_MAX_STRING_SIZE ((int64_t)1 << 8 * (sizeof(size_t) - 1)) - 1
2626

2727
// Handles heap allocations for static strings.
2828
typedef struct npy_string_allocator npy_string_allocator;

0 commit comments

Comments
 (0)