Fix errors in line buffer code

This commit is contained in:
XANTRONIX Development 2024-11-17 22:55:28 -05:00
parent 36a3127ce6
commit 581b456651

View file

@ -1,3 +1,5 @@
import socket
class BufferOverflow(Exception):
def __init__(self):
super().__init__("Buffer overflow")
@ -17,7 +19,7 @@ class LineBuffer():
# Check and see if there is already a line in the
# internal buffer.
#
offset = self.buf.find(b'\n', self.offset, self.count)
offset = self.buf.find(b'\n', self.offset, len(self.buf))
if offset < 0:
#