diff --git a/retroshare-gui/src/gui/chat/HandleRichText.cpp b/retroshare-gui/src/gui/chat/HandleRichText.cpp index c3e5a4271..afb00ed35 100644 --- a/retroshare-gui/src/gui/chat/HandleRichText.cpp +++ b/retroshare-gui/src/gui/chat/HandleRichText.cpp @@ -55,8 +55,10 @@ void EmbedInHtmlImg::InitFromAwkwardHash(const QHash< QString, QString >& hash) * @param[in,out] currentElement The current node (which is of type Element) * @param[in] embedInfos The regular expression and the type of embedding to use */ -void embedHtml(QDomDocument& doc, QDomElement& currentElement, const EmbedInHtml& embedInfos) +void embedHtml(QDomDocument& doc, QDomElement& currentElement, const EmbedInHtml& _embedInfos) { + EmbedInHtml embedInfos(_embedInfos) ; + if(embedInfos.myRE.pattern().length() == 0) // we'll get stuck with an empty regexp return; diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp index a148fdda7..0258c5579 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp @@ -799,13 +799,6 @@ void PopupChatDialog::fileHashingFinished(AttachFileItem* file) rsiface->unlockData(); /* Unlock Interface */ } - //convert fileSize from uint_64 to string for html link - char fileSizeChar [100]; - sprintf(fileSizeChar, "%lld", file->FileSize()); - std::string fileSize = *(&fileSizeChar); - -// std::string mesgString = "" + (file->FileName()) + ""; - std::string mesgString = RetroShareLink(QString::fromStdString(file->FileName()),file->FileSize(),QString::fromStdString(file->FileHash())).toHtml().toStdString() ; #ifdef CHAT_DEBUG diff --git a/retroshare-gui/src/gui/forums/CreateForumMsg.cpp b/retroshare-gui/src/gui/forums/CreateForumMsg.cpp index 64406b920..d2e4d6d0d 100644 --- a/retroshare-gui/src/gui/forums/CreateForumMsg.cpp +++ b/retroshare-gui/src/gui/forums/CreateForumMsg.cpp @@ -368,7 +368,7 @@ void CreateForumMsg::fileHashingFinished(AttachFileItem* file) { //convert fileSize from uint_64 to string for html link char fileSizeChar [100]; - sprintf(fileSizeChar, "%lld", file->FileSize()); + sprintf(fileSizeChar, "%llu", (unsigned long long int)file->FileSize()); std::string fileSize = *(&fileSizeChar); std::string mesgString = ""