Bug 94549

Summary: Size of cd image caculation incorrect.
Product: [Applications] digikam Reporter: Steven Michalske <michalsc>
Component: Plugin-Generic-ArchiveAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED UNMAINTAINED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Steven Michalske 2004-12-06 17:57:00 UTC
Version:           cvs (using KDE KDE 3.3.2)
Installed from:    Compiled From Sources

when all of my images are selected in the CD archiving plugin i magicaly obtain a huge drive capacity 16,777,216 TB  but my album collection is only 2.7 GB
Comment 1 Renchi Raju 2004-12-22 06:28:25 UTC
CVS commit by pahlibar: 


integer overflow when calculating total size. use a double to store the sum

BUG: 94549


  M +2 -2      cdarchivingdialog.cpp   1.38


--- kdeextragear-libs-1/kipi-plugins/cdarchiving/cdarchivingdialog.cpp  #1.37:1.38
@@ -557,5 +557,5 @@ void CDArchivingDialog::slotAlbumSelecte
 {
     QValueList<KIPI::ImageCollection> ListAlbums(m_imageCollectionSelector->selectedImageCollections());
-    int size = 0;
+    double size = 0;
 
     for( QValueList<KIPI::ImageCollection>::Iterator it = ListAlbums.begin(); it != ListAlbums.end(); ++it ) 
@@ -570,5 +570,5 @@ void CDArchivingDialog::slotAlbumSelecte
        } 
     
-    TargetMediaSize = size/1024;
+    TargetMediaSize = (int)(size/1024.0);
           
     ShowMediaCapacity();