aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakamichi Horikawa <takamichiho@gmail.com>2017-09-23 22:42:20 +0900
committerTakamichi Horikawa <takamichiho@gmail.com>2017-09-23 22:42:20 +0900
commitef192344c088aaae5355af13147762e6ef1c083e (patch)
tree8a36b80a4d2f189d86fc0ac857711965b03086dc
parentc9e1d55f082f8ffed93e566532640f2b4e80d768 (diff)
fmp: fixed z8x detection
-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') {