diff options
author | 2016-06-15 23:27:01 +1000 | |
---|---|---|
committer | 2016-06-15 23:27:01 +1000 | |
commit | 13526f680b58d04cb5351be2a8e7c3db2673666d (patch) | |
tree | d471c816cbbf29bb1bb6439322e7409ce4e8bc94 /src/lib/formats/sol_cas.cpp | |
parent | 073848e1c3e11b4dd77c355ed815c59796ae3c0c (diff) |
MT 06236 [Robbbert]
Diffstat (limited to 'src/lib/formats/sol_cas.cpp')
-rw-r--r-- | src/lib/formats/sol_cas.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/formats/sol_cas.cpp b/src/lib/formats/sol_cas.cpp index 88ec0361539..ef808842ec6 100644 --- a/src/lib/formats/sol_cas.cpp +++ b/src/lib/formats/sol_cas.cpp @@ -249,11 +249,14 @@ static int sol20_handle_cassette(INT16 *buffer, const UINT8 *bytes) } sol20_byte_num+=2; // bump to file name - sol20_header[0] = bytes[sol20_byte_num++]; - sol20_header[1] = bytes[sol20_byte_num++]; - sol20_header[2] = bytes[sol20_byte_num++]; - sol20_header[3] = bytes[sol20_byte_num++]; - sol20_header[4] = bytes[sol20_byte_num++]; + for (i = 0; i < 5; i++) + sol20_header[i] = 0x20; + for (i = 0; i < 5; i++) + { + sol20_header[i] = bytes[sol20_byte_num++]; + if (sol20_header[i] == 0x20) + break; + } sol20_header[5] = 0; sol20_scan_to_hex(bytes); // bump to file type sol20_header[6] = sol20_read_hex(bytes, 2); |