Changeset 335 for trunk/src/gui/kernel


Ignore:
Timestamp:
Nov 20, 2009, 10:55:57 PM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui/kernel: mime: Don't store the shared block size at its end (doesn't seem to be actually necessary).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/kernel/qmime_pm.cpp

    r334 r335  
    176176        return 0;
    177177    }
     178
     179
     180
    178181    // get the size rounded to the page boundary (4K)
    179182    ULONG sz = ~0, flags = 0;
     
    189192    // store the exact size to the last dword of the last page
    190193    *(((ULONG *)(data + sz)) - 1) = size;
     194
    191195
    192196    return data;
     
    388392        QByteArray str = mimeData->text().toLocal8Bit();
    389393        // Anticipate required space for CRLFs at 1/40
    390         int maxsize = str.size()+str.size()/40+3;
     394        int maxsize = str.size()+str.size()/40+;
    391395        r.fill('\0', maxsize);
    392396        char *o = r.data();
     
    407411            }
    408412            o[j++] = c;
    409             if (j+3 >= maxsize) {
     413            if (j+ >= maxsize) {
    410414                maxsize += maxsize/4;
    411415                r.resize(maxsize);
     
    413417            }
    414418        }
    415         o[j] = 0;
     419        if (j < r.size())
     420            o[j] = '\0';
    416421    } else if (format == CF_TextUnicode) {
    417422        QString str = mimeData->text();
Note: See TracChangeset for help on using the changeset viewer.