From 11c83c5e9250050ce3b5353bb4cfaae2fc4dd768 Mon Sep 17 00:00:00 2001 From: Filippo Biondi Date: Tue, 13 May 2025 14:43:49 +0200 Subject: [PATCH] Updated to a stricter condition to check if a patch is finished when parsing boundary content from binary files --- smithers/io/openfoam/field_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smithers/io/openfoam/field_parser.py b/smithers/io/openfoam/field_parser.py index 966f0e5..68bc274 100755 --- a/smithers/io/openfoam/field_parser.py +++ b/smithers/io/openfoam/field_parser.py @@ -172,7 +172,7 @@ def split_boundary_content(content): if lc.rstrip() == b'}': break if in_patch_field: - if lc.strip() == b'}': + if lc.strip(b' \t\n') == b'}' and content[n-1].endswith(b');\n'): bd[current_path][1] = n-1 in_patch_field = False current_path = ''