Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
71f8cb83
Commit
71f8cb83
authored
Feb 05, 2009
by
Thorbjørn Lindeijer
Browse files
Fixed the libs patcher paths
It was taking the wrong length when constructing the new paths. Reviewed-by: Danimo
parent
ec113e27
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/tools/qtlibspatcher/qtlibspatchermain.cpp
View file @
71f8cb83
...
...
@@ -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
+
textToAppend
2
Len
,
textToAppend2
,
bytesToAllocate
-
textToCopyLen
-
textToAppend
2
Len
-
1
);
strncpy
(
res
+
textToCopyLen
+
textToAppendLen
,
textToAppend2
,
bytesToAllocate
-
textToCopyLen
-
textToAppendLen
-
1
);
res
[
textToCopyLen
+
textToAppendLen
+
textToAppend2Len
]
=
'\0'
;
res
[
bytesToAllocate
-
1
]
=
'\0'
;
// Safe is safe
return
res
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment