Skip to content

Commit fbe9b13

Browse files
committed
Correct constant pool bucket type logic
When replacing an owned constant by a different type (constant or shared) replace with the correct type instead of defaulting to shared.
1 parent c4c0c81 commit fbe9b13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/pm_constant_pool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ pm_constant_pool_insert(pm_constant_pool_t *pool, const uint8_t *start, size_t l
264264
// constant and replace it with the shared constant.
265265
xfree((void *) constant->start);
266266
constant->start = start;
267-
bucket->type = (unsigned int) (PM_CONSTANT_POOL_BUCKET_DEFAULT & 0x3);
267+
bucket->type = (unsigned int) (type & 0x3);
268268
}
269269

270270
return bucket->id;

0 commit comments

Comments
 (0)