Skip to content

Commit 5131683

Browse files
committed
Fix issue with test 055 on Cygwin
- stored value was overwritten probably due to compiler optimisation bug
1 parent 3d98227 commit 5131683

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/markdown.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,7 @@ static void convertStringFragment(QCString &result,const char *data,int size)
265265
{
266266
TRACE(result);
267267
if (size<0) size=0;
268-
result.resize(size+1);
269-
memcpy(result.rawData(),data,size);
270-
result.at(size)='\0';
268+
result = QCString(data,(uint)size);
271269
}
272270

273271
/** helper function to convert presence of left and/or right alignment markers

src/qcstring.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@ class QCString
132132
/** creates a string from \a str and copies over the first \a maxlen characters. */
133133
QCString( const char *str, uint maxlen ) : m_rep(str?str:"") { m_rep.resize(maxlen); }
134134

135-
/** replaces the contents by that of string \a s. */
136-
137135
/** replaces the contents by that of C string \a str. */
138136
QCString &operator=( const char *str) { m_rep = str?str:""; return *this; }
139137

0 commit comments

Comments
 (0)