2010-10-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Fixed improper use of vsnprintf
	* src/StringFormat.cc
pull/1/head
Tatsuhiro Tsujikawa 2010-10-26 11:46:19 +00:00
parent 831bac1471
commit 5eec87df03
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-10-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed improper use of vsnprintf
* src/StringFormat.cc
2010-10-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2010-10-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that dht.dat file could not be saved. This is Fixed the bug that dht.dat file could not be saved. This is

View File

@ -48,7 +48,7 @@ StringFormat::StringFormat(const char* fmt, ...)
char buf[1024]; char buf[1024];
int r; int r;
if((r = vsnprintf(buf, sizeof(buf), fmt, ap)) > 0) { if((r = vsnprintf(buf, sizeof(buf), fmt, ap)) > 0) {
msg_.assign(&buf[0], &buf[r]); msg_ = buf;
} }
va_end(ap); va_end(ap);
} }