Should not decrement count when PACK_FLAG_COUNT2; fix #5057

This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-08-03 19:46:34 +09:00
parent faed5054f8
commit 43443d9377
+1 -1
View File
@@ -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--;
}
}