handle --max_log_size overflow
This commit is contained in:
parent
45fdc922de
commit
3533c22d21
@ -341,7 +341,7 @@ static const char* GetAnsiColorCode(GLogColor color) {
|
|||||||
|
|
||||||
// Safely get max_log_size, overriding to 1 if it somehow gets defined as 0
|
// Safely get max_log_size, overriding to 1 if it somehow gets defined as 0
|
||||||
static int32 MaxLogSize() {
|
static int32 MaxLogSize() {
|
||||||
return (FLAGS_max_log_size > 0 ? FLAGS_max_log_size : 1);
|
return (FLAGS_max_log_size > 0 && FLAGS_max_log_size < 4096 ? FLAGS_max_log_size : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// An arbitrary limit on the length of a single log message. This
|
// An arbitrary limit on the length of a single log message. This
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user