From c60b284e1f653e710a7758308e0290cefb73a88c Mon Sep 17 00:00:00 2001 From: tqchen Date: Mon, 20 Apr 2015 11:37:45 -0700 Subject: [PATCH] resize during tracker print --- include/rabit/rabit-inl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/rabit/rabit-inl.h b/include/rabit/rabit-inl.h index 97c43767d..94da54a2f 100644 --- a/include/rabit/rabit-inl.h +++ b/include/rabit/rabit-inl.h @@ -174,6 +174,7 @@ inline void TrackerPrintf(const char *fmt, ...) { va_start(args, fmt); vsnprintf(&msg[0], kPrintBuffer, fmt, args); va_end(args); + msg.resize(strlen(msg.c_str()); TrackerPrint(msg); } #endif