Skip to content

Commit 99592c1

Browse files
committed
fix: #114 improve robustness to unknown boundry conditions
1 parent d35aa36 commit 99592c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mcx_utils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,11 +1188,11 @@ void mcx_preprocess(Config *cfg){
11881188
cfg->srcdir.z*=tmp;
11891189

11901190
for(int i=0;i<6;i++)
1191-
if(cfg->bc[i]>='A' && mcx_lookupindex(cfg->bc+i,boundarycond))
1191+
if(cfg->bc[i] && mcx_lookupindex(cfg->bc+i,boundarycond))
11921192
MCX_ERROR(-4,"unknown boundary condition specifier");
11931193

11941194
for(int i=6;i<12;i++){
1195-
if(cfg->bc[i]>='0' && mcx_lookupindex(cfg->bc+i,boundarydetflag))
1195+
if(cfg->bc[i] && mcx_lookupindex(cfg->bc+i,boundarydetflag))
11961196
MCX_ERROR(-4,"unknown boundary detection flags");
11971197
if(cfg->bc[i])
11981198
isbcdet=1;

0 commit comments

Comments
 (0)