mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Fix infinite loop bug in error module. Closes #150.
This commit is contained in:
parent
e6aee9d1c0
commit
f85ac4038c
1 changed files with 22 additions and 6 deletions
|
|
@ -50,9 +50,17 @@ contains
|
|||
i_end = i_start + index(message(i_start+1:i_start+line_wrap-indent+1), &
|
||||
' ', BACK=.true.)
|
||||
|
||||
! Write up to last space
|
||||
write(OUTPUT_UNIT, fmt='(A/A)', advance='no') &
|
||||
message(i_start+1:i_end-1), repeat(' ', indent)
|
||||
if (i_end == i_start) then
|
||||
! This is a special case where there is no space
|
||||
i_end = i_start + line_wrap - indent + 1
|
||||
write(ERROR_UNIT, fmt='(A/A)', advance='no') &
|
||||
message(i_start+1:i_end-1), repeat(' ', indent)
|
||||
i_end = i_end - 1
|
||||
else
|
||||
! Write up to last space
|
||||
write(OUTPUT_UNIT, fmt='(A/A)', advance='no') &
|
||||
message(i_start+1:i_end-1), repeat(' ', indent)
|
||||
end if
|
||||
|
||||
! Advance starting position
|
||||
i_start = i_end
|
||||
|
|
@ -109,9 +117,17 @@ contains
|
|||
i_end = i_start + index(message(i_start+1:i_start+line_wrap-indent+1), &
|
||||
' ', BACK=.true.)
|
||||
|
||||
! Write up to last space
|
||||
write(ERROR_UNIT, fmt='(A/A)', advance='no') &
|
||||
message(i_start+1:i_end-1), repeat(' ', indent)
|
||||
if (i_end == i_start) then
|
||||
! This is a special case where there is no space
|
||||
i_end = i_start + line_wrap - indent + 1
|
||||
write(ERROR_UNIT, fmt='(A/A)', advance='no') &
|
||||
message(i_start+1:i_end-1), repeat(' ', indent)
|
||||
i_end = i_end - 1
|
||||
else
|
||||
! Write up to last space
|
||||
write(ERROR_UNIT, fmt='(A/A)', advance='no') &
|
||||
message(i_start+1:i_end-1), repeat(' ', indent)
|
||||
end if
|
||||
|
||||
! Advance starting position
|
||||
i_start = i_end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue