From 263f02693a2eab6b9effad43fd295cd9911ecbe2 Mon Sep 17 00:00:00 2001 From: n-isaka Date: Sat, 2 Aug 2025 12:27:10 +0000 Subject: [PATCH] fix(file): only one split key can't open --- libcob/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcob/fileio.c b/libcob/fileio.c index ec7fc3e7..c5ae3979 100644 --- a/libcob/fileio.c +++ b/libcob/fileio.c @@ -1910,7 +1910,7 @@ indexed_open (cob_file *f, char *filename, const int mode, const int sharing) } } /* additional change to BCS/JR patch: put off the simple-key assamption. */ - if (fh->key[k].k_nparts == 1 + if (fh->key[k].k_nparts == 1 && !f->keys[k].count_components && (fh->key[k].k_start != f->keys[k].offset || fh->key[k].k_leng != f->keys[k].field->size)) { ret = COB_STATUS_39_CONFLICT_ATTRIBUTE;