From 13526f680b58d04cb5351be2a8e7c3db2673666d Mon Sep 17 00:00:00 2001 From: Robbbert Date: Wed, 15 Jun 2016 23:27:01 +1000 Subject: MT 06236 [Robbbert] --- src/lib/formats/sol_cas.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/lib/formats/sol_cas.cpp') 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); -- cgit v1.2.3-70-g09d2