aboutsummaryrefslogtreecommitdiff
path: root/fmdriver
diff options
context:
space:
mode:
Diffstat (limited to 'fmdriver')
-rw-r--r--fmdriver/fmdriver_fmp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fmdriver/fmdriver_fmp.c b/fmdriver/fmdriver_fmp.c
index 54f6753..9abfaaa 100644
--- a/fmdriver/fmdriver_fmp.c
+++ b/fmdriver/fmdriver_fmp.c
@@ -3208,20 +3208,20 @@ static void fmp_title(
int l = 0;
int li = 0;
for (int si = 0;; si++) {
- if (l >= 3) {
- // Z8X
- fmp->pdzf.mode = 1;
- return;
- }
if ((offset + si) >= fmp->datalen) {
- fmp->comment[l][0] = 0;
+ if (l < 3) fmp->comment[l][0] = 0;
return;
}
if (li >= FMP_COMMENT_BUFLEN) {
- fmp->comment[l][0] = 0;
+ if (l < 3) fmp->comment[l][0] = 0;
return;
}
uint8_t c = fmp->data[offset+si];
+ if (l >= 3) {
+ // Z8X
+ if (c) fmp->pdzf.mode = 1;
+ return;
+ }
if (c == '\r') {
continue;
} else if (c == '\n') {