瀏覽代碼

Fix output size truncation

master
JustAnotherArchivist 3 年之前
父節點
當前提交
4db2a4d6bc
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      irclog.py

+ 3
- 2
irclog.py 查看文件

@@ -1073,8 +1073,9 @@ class WebServer:
# Try to find the last LF in the previous buffers
for i, prevBuf in enumerate(reversed(out)):
if (lfPos := prevBuf.rfind(b'\n')) > -1:
out[i] = out[i][:lfPos + 1]
out = out[:i + 1]
j = len(out) - 1 - i
out[j] = out[j][:lfPos + 1]
out = out[:j + 1]
break
else:
# No newline to be found anywhere at all; no output.


Loading…
取消
儲存