Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(664)

Unified Diff: src/value-serializer.cc

Issue 2326653002: Add a missing cast to ValueDeserializer::ReadVarint. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/value-serializer.cc
diff --git a/src/value-serializer.cc b/src/value-serializer.cc
index a3e031f7ca587042cc3390e8dc990d584a83fec1..6c3d7e058c2dbf27d35b2b7d2c02ce5faeb55812 100644
--- a/src/value-serializer.cc
+++ b/src/value-serializer.cc
@@ -820,7 +820,7 @@ Maybe<T> ValueDeserializer::ReadVarint() {
if (position_ >= end_) return Nothing<T>();
uint8_t byte = *position_;
if (V8_LIKELY(shift < sizeof(T) * 8)) {
- value |= (byte & 0x7f) << shift;
+ value |= static_cast<T>(byte & 0x7f) << shift;
shift += 7;
}
has_another_byte = byte & 0x80;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698