author | deller <deller> | 2005-04-05 21:10:11 (UTC) |
---|---|---|
committer | deller <deller> | 2005-04-05 21:10:11 (UTC) |
commit | f0000ae8e62df9606160ab683ae163ddc40c32c4 (patch) (side-by-side diff) | |
tree | 642a8b7927c7ff77d196399d4498559e585a2487 /libopie2 | |
parent | e9f44f94ac905e49ea5def24532ac2d3bf4ed053 (diff) | |
download | opie-f0000ae8e62df9606160ab683ae163ddc40c32c4.zip opie-f0000ae8e62df9606160ab683ae163ddc40c32c4.tar.gz opie-f0000ae8e62df9606160ab683ae163ddc40c32c4.tar.bz2 |
crash-fix in odevice.cpp while scanning the distribution table (#1565)
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index af77ed1..fcdbf45 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp @@ -170,49 +170,49 @@ ODevice::ODevice() d->m_model = Model_Unknown; d->m_vendorstr = "Unknown"; d->m_vendor = Vendor_Unknown; d->m_systemstr = "Unknown"; d->m_system = System_Unknown; d->m_sysverstr = "0.0"; d->m_rotation = Rot0; d->m_direction = CW; d->m_holdtime = 1000; // 1000ms d->m_buttons = 0; d->m_cpu_frequencies = new QStrList; /* mixer */ d->m_sound = d->m_vol = d->m_mixer = -1; /* System QCopChannel created */ d->m_initializedButtonQcop = false; // New distribution detection code first checks for legacy distributions, // identified by /etc/familiar-version or /etc/oz_version. // Then check for OpenEmbedded and lastly, read /etc/issue - for ( unsigned int i = 0; i < sizeof distributions; ++i ) + for ( unsigned int i = 0; i < sizeof(distributions)/sizeof(ODistribution); ++i ) { if ( QFile::exists( distributions[i].sysvfile ) ) { d->m_systemstr = distributions[i].sysstr; d->m_system = distributions[i].system; d->m_sysverstr = "<Unknown>"; QFile f( distributions[i].sysvfile ); if ( f.open( IO_ReadOnly ) ) { QTextStream ts( &f ); d->m_sysverstr = ts.readLine().replace( QRegExp( "\\\\." ), "" ); } break; } } } void ODevice::systemMessage( const QCString &msg, const QByteArray & ) { if ( msg == "deviceButtonMappingChanged()" ) { reloadButtonMapping(); } } |