Should not decrement `count` when `PACK_FLAG_COUNT2`; fix #5057

parent faed5054
......@@ -1302,7 +1302,7 @@ mrb_pack_pack(mrb_state *mrb, mrb_value ary)
aidx++;
break;
}
if (count > 0) {
if (!(flags & PACK_FLAG_COUNT2) && count > 0) {
count--;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment