diff options
author | Thorbjørn Lindeijer <[email protected]> | 2009-02-05 11:04:38 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <[email protected]> | 2009-02-05 11:07:43 +0100 |
commit | 71f8cb835fc1ef7228055f6d3a4d8a9b3cd2a982 (patch) | |
tree | f1630fe177a3ea47d0f472d4993f17c67249a1eb /src/tools/qtlibspatcher | |
parent | ec113e27a9a6f31c1c5d81cf8818b46366e89871 (diff) |
Fixed the libs patcher paths
It was taking the wrong length when constructing the new paths.
Reviewed-by: Danimo
Diffstat (limited to 'src/tools/qtlibspatcher')
-rw-r--r-- | src/tools/qtlibspatcher/qtlibspatchermain.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tools/qtlibspatcher/qtlibspatchermain.cpp b/src/tools/qtlibspatcher/qtlibspatchermain.cpp index b66a35f294c..df7a927d413 100644 --- a/src/tools/qtlibspatcher/qtlibspatchermain.cpp +++ b/src/tools/qtlibspatcher/qtlibspatchermain.cpp @@ -136,7 +136,6 @@ char * allocFileNameCopyAppend(const char * textToCopy, Q_ASSERT(textToAppend != NULL); if (textToAppend2 == NULL) textToAppend2 = ""; - Q_ASSERT(textToAppend2 != NULL); char * const res = new char[bytesToAllocate]; const size_t textToCopyLen = strlen(textToCopy); @@ -153,7 +152,7 @@ char * allocFileNameCopyAppend(const char * textToCopy, if (textToAppendLen > 0) strncpy(res + textToCopyLen, textToAppend, bytesToAllocate - textToCopyLen - 1); if (textToAppend2Len > 0) - strncpy(res + textToCopyLen + textToAppend2Len, textToAppend2, bytesToAllocate - textToCopyLen - textToAppend2Len - 1); + strncpy(res + textToCopyLen + textToAppendLen, textToAppend2, bytesToAllocate - textToCopyLen - textToAppendLen - 1); res[textToCopyLen + textToAppendLen + textToAppend2Len] = '\0'; res[bytesToAllocate - 1] = '\0'; // Safe is safe return res; |