1 --- src/misc.cpp.orig 2006-11-19 18:30:08.538643734 +0100
2 +++ src/misc.cpp 2006-11-19 18:34:41.635711234 +0100
7 + QRegExp separator("\\s+");
9 if (f.open(IO_ReadOnly))
10 { // file opened successfully
15 - line = t.readLine(); // line of text excluding '\n'
16 + line = t.readLine().simplifyWhiteSpace(); // line of text excluding '\n'
18 if(!line.startsWith("#") && !line.isEmpty())
20 - if(((line.section("\t",1,1,QString::SectionSkipEmpty)).replace(QRegExp("/$"),"")).compare(cfgcdpath) == 0)
22 - strcpy(devicename,(const char *)line.section("\t",0,0));
24 - if(((line.section(" " ,1,1,QString::SectionSkipEmpty)).replace(QRegExp("/$"),"")).compare(cfgcdpath) == 0)
26 - strcpy(devicename,(const char *)line.section(" " ,0,0));
28 + if(line.section(separator, 1, 1, QString::SectionSkipEmpty).compare(cfgcdpath) == 0)
30 + strncpy(devicename, (const char *) line.section(separator, 0, 0), 63);