Fix wrong condition for `PACK_DIR_HEX`; ref #5057

parent 43443d93
......@@ -1298,11 +1298,12 @@ mrb_pack_pack(mrb_state *mrb, mrb_value ary)
default:
break;
}
if (dir == PACK_DIR_STR || dir == PACK_DIR_BASE64) { /* always consumes 1 entry */
if (dir == PACK_DIR_STR || dir == PACK_DIR_BASE64 || dir == PACK_DIR_HEX) {
/* always consumes 1 entry */
aidx++;
break;
}
if (!(flags & PACK_FLAG_COUNT2) && count > 0) {
if (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