Closed zxy16305 closed 5 months ago
Thanks. Seems fine to me. Commits need to have a signed-off-by line for me to commit directly though - see: https://www.klipper3d.org/CONTRIBUTING.html
-Kevin
Thank you! I'll close this pull request and open another one at https://github.com/Klipper3d/klipper/pull/6472
The resume process begins at
self.current_file.seek(self.file_position)
, whereself.file_position
represents a byte-length offset. However,file_position
is incremented bylen(line)
, which corresponds to the string length. If there are any UTF-8 characters preceding the 'PAUSE' command, the resumed file position must be set before the occurrence of 'PAUSE'.To address this issue, replacing the string length with the byte length is sufficient.