summaryrefslogtreecommitdiffabout
path: root/lib/util.cc
authorMichael Krelin <hacker@klever.net>2007-12-09 22:10:49 (UTC)
committer Michael Krelin <hacker@klever.net>2007-12-09 22:10:49 (UTC)
commit2e7bf3278c3e13baaa32c7ec8c2b3fdc4780a080 (patch) (side-by-side diff)
treed36530a517425d2507df8e9550fbcc48fba48c5f /lib/util.cc
parentc34adc6e274c3dbb63af99ca566000e7d218244c (diff)
parent7a6a6fbcf7e20f0d7da5f625a73c865b361f16aa (diff)
downloadlibopkele-2e7bf3278c3e13baaa32c7ec8c2b3fdc4780a080.zip
libopkele-2e7bf3278c3e13baaa32c7ec8c2b3fdc4780a080.tar.gz
libopkele-2e7bf3278c3e13baaa32c7ec8c2b3fdc4780a080.tar.bz2
Merge branch 'next' into devel/xri
Diffstat (limited to 'lib/util.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--lib/util.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/util.cc b/lib/util.cc
index 83f0eef..4600576 100644
--- a/lib/util.cc
+++ b/lib/util.cc
@@ -218,15 +218,15 @@ namespace opkele {
if(ic==':') {
string::size_type ni = uri.find_first_of("/#?%",interesting+1);
const char *nptr = uri.data()+interesting+1;
char *eptr = 0;
long port = strtol(nptr,&eptr,10);
if( (port>0) && (port<65535) && port!=(s?443:80) ) {
- char tmp[6];
- snprintf(tmp,sizeof(tmp),"%ld",port);
- rv += ':'; rv += tmp;
+ char tmp[8];
+ snprintf(tmp,sizeof(tmp),":%ld",port);
+ rv += tmp;
}
if(ni==string::npos) {
rv += '/'; return rv;
}
interesting = ni;
}else if(ic!='/') {