8148005: One byte may be corrupted by get_datetime_string()
Reviewed-by: dholmes
This commit is contained in:
parent
88711a6b2d
commit
395a248587
@ -380,7 +380,7 @@ extern Mutex* tty_lock;
|
||||
char* get_datetime_string(char *buf, size_t len) {
|
||||
os::local_time_string(buf, len);
|
||||
int i = (int)strlen(buf);
|
||||
while (i-- >= 0) {
|
||||
while (--i >= 0) {
|
||||
if (buf[i] == ' ') buf[i] = '_';
|
||||
else if (buf[i] == ':') buf[i] = '-';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user