From 04a5b89a91c85ce51d99292f27b61b7a081f48bd Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Sat, 25 Nov 2006 12:08:48 +0000 Subject: [PATCH] URLs don't truncated now --- golded3/geread2.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/golded3/geread2.cpp b/golded3/geread2.cpp index 5c5e938..acdd9d4 100644 --- a/golded3/geread2.cpp +++ b/golded3/geread2.cpp @@ -725,14 +725,17 @@ void ReadPeekURLs(GMsg* msg) { if(ispunct(end[-1]) and (end[-1] != '/')) --end; if(begin < end) { - buf[0] = ' '; - strxcpy(buf+1, ptr, MinV((long)((end-ptr)+1), (long)(MAXCOL-2-2-2))); - strcat(buf, " "); + char* bufurl=(char*)throw_malloc(end-ptr+3); + bufurl[0] = ' '; + strxcpy(bufurl+1, ptr, (end-ptr)+1); + strcat(bufurl, " "); for(i = urls.begin(); i != urls.end(); i++) - if(strieql(*i, buf)) + if(strieql(*i, bufurl)) break; if(i == urls.end()) - urls.push_back(throw_strdup(buf)); + urls.push_back(bufurl); + else + throw_free(bufurl); ptr = end-1; } }