1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-16 15:28:06 +00:00

Fix trailing :pack-all or :pack in struct.

This commit is contained in:
Calvin Rose
2022-06-19 13:02:26 -05:00
parent c1a0352592
commit cfaae47cea
3 changed files with 17 additions and 5 deletions

View File

@@ -346,6 +346,7 @@ static JanetFFIStruct *build_struct_type(int32_t argc, const Janet *argv) {
if (janet_keyeq(argv[j], "pack") || janet_keyeq(argv[j], "pack-all")) {
pack_one = 1;
j++;
if (j == argc) break;
}
st->fields[i].type = decode_ffi_type(argv[j]);
size_t el_size = type_size(st->fields[i].type);