aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
diff options
context:
space:
mode:
authorKiswich <zxy16305@gmail.com>2024-01-27 22:23:50 +0800
committerGitHub <noreply@github.com>2024-01-27 09:23:50 -0500
commit600e89ae8c759613a3c6fc2b24d0a62d00e6baf2 (patch)
tree6ce261c61c4cc6788030a5ff3f0727bb8ca72dd8 /klippy/extras
parent5e3daa6f21d6485e4e757d0df00e01a13c968541 (diff)
downloadkutter-600e89ae8c759613a3c6fc2b24d0a62d00e6baf2.tar.gz
kutter-600e89ae8c759613a3c6fc2b24d0a62d00e6baf2.tar.xz
kutter-600e89ae8c759613a3c6fc2b24d0a62d00e6baf2.zip
virtual_sdcard: fix virtual SD file position count (#6472)
Signed-off-by: Zhang Qiwei <zxy16305@gmail.com>
Diffstat (limited to 'klippy/extras')
-rw-r--r--klippy/extras/virtual_sdcard.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/klippy/extras/virtual_sdcard.py b/klippy/extras/virtual_sdcard.py
index 31f283ff..1bb914ab 100644
--- a/klippy/extras/virtual_sdcard.py
+++ b/klippy/extras/virtual_sdcard.py
@@ -258,7 +258,7 @@ class VirtualSD:
# Dispatch command
self.cmd_from_sd = True
line = lines.pop()
- next_file_position = self.file_position + len(line) + 1
+ next_file_position = self.file_position + len(line.encode()) + 1
self.next_file_position = next_file_position
try:
self.gcode.run_script(line)