Chromium Code Reviews| Index: src/core/SkValidatingReadBuffer.cpp |
| diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp |
| index 0ffe650787fe7b698ad0dc17b32568517e28dd1f..2d4b708435e84c4b8ff6d4684eca154882ddcb3f 100644 |
| --- a/src/core/SkValidatingReadBuffer.cpp |
| +++ b/src/core/SkValidatingReadBuffer.cpp |
| @@ -44,7 +44,12 @@ const void* SkValidatingReadBuffer::skip(size_t size) { |
| // true, which the caller should check to see if an error occurred during the read operation. |
| bool SkValidatingReadBuffer::readBool() { |
| - return this->readInt() != 0; |
| + uint32_t value = this->readInt(); |
|
Stephen White
2013/10/23 18:09:35
Not new to this patch, but some flavours of writeB
sugoi1
2013/10/23 18:17:08
Yeah, I had to check that noone was doing any kind
|
| + // Boolean value should be either 0 or 1 |
| + if (value & 0xFFFFFFFE) { |
|
reed1
2013/10/23 17:58:42
this is correct, but possibly hard for a reviewer
sugoi1
2013/10/23 18:07:43
Done.
|
| + fError = true; |
| + } |
| + return value != 0; |
| } |
| SkColor SkValidatingReadBuffer::readColor() { |