Index: src/heap-snapshot-generator.cc |
diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc |
index ad6536e3580921add872e3b4fa17c6c3ae151c5b..8e185184cea3c6b5a9aca3af727b92cc0fac975a 100644 |
--- a/src/heap-snapshot-generator.cc |
+++ b/src/heap-snapshot-generator.cc |
@@ -3102,7 +3102,7 @@ void HeapSnapshotJSONSerializer::SerializeString(const unsigned char* s) { |
WriteUChar(writer_, *s); |
} else { |
// Convert UTF-8 into \u UTF-16 literal. |
- unsigned length = 1, cursor = 0; |
+ size_t length = 1, cursor = 0; |
for ( ; length <= 4 && *(s + length) != '\0'; ++length) { } |
unibrow::uchar c = unibrow::Utf8::CalculateValue(s, length, &cursor); |
if (c != unibrow::Utf8::kBadChar) { |