summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats/ccvf_dsk.c
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2015-05-02 19:41:03 +0200
committer ImJezze <jezze@gmx.net>2015-05-02 19:41:03 +0200
commitcc3b682e52bf097d31db78032aad01d6a0b12e94 (patch)
tree860c97ca011b64c31a5ad277f5cea2b1d86eeaf0 /src/lib/formats/ccvf_dsk.c
parent7df6a23ba2ae1c1df94ed8cc2398f2546f339997 (diff)
parenta649a95488e1fc85813dda747dc74c596496bd1c (diff)
Merge pull request #1 from mamedev/master
Sync to master
Diffstat (limited to 'src/lib/formats/ccvf_dsk.c')
-rw-r--r--src/lib/formats/ccvf_dsk.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/formats/ccvf_dsk.c b/src/lib/formats/ccvf_dsk.c
index 03ee6fd0dbc..44d919bc88e 100644
--- a/src/lib/formats/ccvf_dsk.c
+++ b/src/lib/formats/ccvf_dsk.c
@@ -93,18 +93,18 @@ bool ccvf_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
dynamic_buffer img(size);
io_generic_read(io, &img[0], 0, size);
- astring ccvf = astring((const char *)&img[0], size);
+ std::string ccvf = std::string((const char *)&img[0], size);
dynamic_buffer bytes(78720);
int start = 0, end = 0;
- astring line;
+ std::string line;
UINT32 byteoffs = 0;
char hex[3] = {0};
do {
- end = ccvf.chr(start, 10);
- line.cpysubstr(ccvf, start, end);
- if (line.find(0, "Compucolor Virtual Floppy Disk Image") && line.find(0, "Label") && line.find(0, "Track")) {
+ end = ccvf.find_first_of(10, start);
+ line.assign(ccvf.substr(start, end));
+ if (line.find("Compucolor Virtual Floppy Disk Image") != std::string::npos && line.find("Label") != std::string::npos && line.find("Track") != std::string::npos) {
for (int byte = 0; byte < 32; byte++) {
if (byteoffs==78720) break;
hex[0]=line[byte * 2];