Bug 94549 - Size of cd image caculation incorrect.
Summary: Size of cd image caculation incorrect.
Status: RESOLVED UNMAINTAINED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-Archive (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-06 17:57 UTC by Steven Michalske
Modified: 2017-08-18 13:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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();