From 1cdc75b4b786033cdbc4d588f0484bebda8f3bb1 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Sat, 21 Sep 2024 10:58:51 +0800 Subject: [PATCH] put tag into condition branch --- src/monty/io.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/monty/io.py b/src/monty/io.py index 7c6b264d..56a1ff95 100644 --- a/src/monty/io.py +++ b/src/monty/io.py @@ -253,7 +253,8 @@ def reverse_readline( # Skip first match (the last line ending) if skipped_1st_l_end: yield line + l_end - skipped_1st_l_end = True + else: + skipped_1st_l_end = True # Line ending not in current buffer, load next block into the buffer elif pt_pos > 0: