virtual_sdcard: fix virtual SD file position count (#6472)

Signed-off-by: Zhang Qiwei <zxy16305@gmail.com>
This commit is contained in:
Kiswich 2024-01-27 22:23:50 +08:00 committed by GitHub
parent 5e3daa6f21
commit 600e89ae8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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)