mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-compiler (merge_op_string): fix #6477
If two merging strings are the same and registered at the bottom of the pool, we should not remove the slot from the pool.
This commit is contained in:
@@ -870,7 +870,7 @@ merge_op_string(codegen_scope *s, uint16_t dst, uint16_t b1, uint16_t b2, const
|
||||
off = b1;
|
||||
realloc_pool_str(s, p1, len1+len2);
|
||||
memcpy((void*)(p1->u.str+len1), (void*)p2->u.str, len2);
|
||||
if (used == 0 && b2+1 == s->irep->plen) {
|
||||
if (b1 != b2 && used == 0 && b2+1 == s->irep->plen) {
|
||||
free_pool_str(s, p2);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user