Fix wrong condition for `PACK_DIR_HEX`; ref
MODIFY
mrbgems/mruby-pack/src/pack.c
mrbgems/mruby-pack/src/pack.c
@@ -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--;
}
}

Fix wrong condition for `PACK_DIR_HEX`; ref #5057