Show
Ignore:
Timestamp:
09/15/07 20:20:13 (1 year ago)
Author:
daboo
Message:

Fix some bad pointer arithmetic errors. This fixes crashes during drag and drop.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Mulberry/trunk/Linux/Sources/Application/Letter/CFileTable.cp

    r21 r107  
    15661566                { 
    15671567                        // Copy to global after lock 
    1568                         CAttachment** pAddr = reinterpret_cast<CAttachment**>(data); 
    1569                         *((int*) pAddr) = atchs.size(); 
    1570                         pAddr += sizeof(int); 
     1568                        unsigned char* ptr = data; 
     1569                        *((int*) ptr) = atchs.size(); 
     1570                        ptr += sizeof(int); 
    15711571                        for(CAttachmentList::iterator iter = atchs.begin(); iter != atchs.end(); iter++) 
    1572                                 *pAddr++ = *iter; 
     1572                        { 
     1573                                *((CAttachment**) ptr) = *iter; 
     1574                                ptr += sizeof(CAttachment*); 
     1575                        } 
    15731576                         
    15741577                        seldata->SetData(type, data, dataLength);