Fix some copyright lines in folly/experimental/symbolizer/
[folly.git] / folly / experimental / symbolizer / Symbolizer.cpp
index 64acdcb72d9c4b3ee953436694291f25b1c13104..4f750efe38c7ba60da75ae7b63c337554c6a4944 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2012-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -249,7 +249,7 @@ void SymbolizePrinter::color(SymbolizePrinter::Color color) {
   if ((options_ & COLOR) == 0 && ((options_ & COLOR_IF_TTY) == 0 || !isTty_)) {
     return;
   }
-  if (color < 0 || color >= kColorMap.size()) {
+  if (static_cast<size_t>(color) >= kColorMap.size()) { // catches underflow too
     return;
   }
   doPrint(kColorMap[color]);