소스 검색

✏️ Fix getLFNName parameter (#23752)

GHGiampy 2 년 전
부모
커밋
fee85b318e
No account linked to committer's email address
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      Marlin/src/sd/SdBaseFile.cpp

+ 2
- 2
Marlin/src/sd/SdBaseFile.cpp 파일 보기

@@ -1140,8 +1140,8 @@ bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) {
1140 1140
         // We can't reconvert to UTF-8 here as UTF-8 is variable-size encoding, but joining LFN blocks
1141 1141
         // needs static bytes addressing. So here just store full UTF-16LE words to re-convert later.
1142 1142
         uint16_t idx = (startOffset + i) * 2; // This is fixed as FAT LFN always contain UTF-16LE encoding
1143
-        longFilename[idx] = utf16_ch & 0xFF;
1144
-        longFilename[idx + 1] = (utf16_ch >> 8) & 0xFF;
1143
+        lname[idx] = utf16_ch & 0xFF;
1144
+        lname[idx + 1] = (utf16_ch >> 8) & 0xFF;
1145 1145
       #else
1146 1146
         // Replace all multibyte characters to '_'
1147 1147
         lname[startOffset + i] = (utf16_ch > 0xFF) ? '_' : (utf16_ch & 0xFF);

Loading…
취소
저장