[Kde-imaging] [Bug 94549] Size of cd image caculation incorrect.

Renchi Raju renchi at pooh.tam.uiuc.edu
Wed Dec 22 06:28:26 CET 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
        
http://bugs.kde.org/show_bug.cgi?id=94549        
renchi pooh tam uiuc edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From renchi pooh tam uiuc edu  2004-12-22 06:28 -------
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();


More information about the Kde-imaging mailing list