diff options
author | Takamichi Horikawa <takamichiho@gmail.com> | 2017-09-23 22:42:20 +0900 |
---|---|---|
committer | Takamichi Horikawa <takamichiho@gmail.com> | 2017-09-23 22:42:20 +0900 |
commit | ef192344c088aaae5355af13147762e6ef1c083e (patch) | |
tree | 8a36b80a4d2f189d86fc0ac857711965b03086dc /fmdriver/fmdriver_fmp.c | |
parent | c9e1d55f082f8ffed93e566532640f2b4e80d768 (diff) |
fmp: fixed z8x detection
Diffstat (limited to 'fmdriver/fmdriver_fmp.c')
-rw-r--r-- | fmdriver/fmdriver_fmp.c | 14 |
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') {
|