Index: src/effects/SkMergeImageFilter.cpp |
diff --git a/src/effects/SkMergeImageFilter.cpp b/src/effects/SkMergeImageFilter.cpp |
index 4de1093612e1c7215412c3c2883a48839656ebf0..93e23356101c71430716d530113f224b2abf9d0a 100755 |
--- a/src/effects/SkMergeImageFilter.cpp |
+++ b/src/effects/SkMergeImageFilter.cpp |
@@ -161,10 +161,9 @@ SkMergeImageFilter::SkMergeImageFilter(SkFlattenableReadBuffer& buffer) : INHERI |
if (hasModes) { |
this->initAllocModes(); |
int nbInputs = countInputs(); |
- bool sizeMatches = buffer.getArrayCount() == nbInputs * sizeof(fModes[0]); |
- buffer.validate(sizeMatches); |
- SkASSERT(sizeMatches); |
- buffer.readByteArray(fModes); |
+ size_t size = nbInputs * sizeof(fModes[0]); |
+ SkASSERT(buffer.getArrayCount() == size); |
+ buffer.readByteArray(fModes, size); |
for (int i = 0; i < nbInputs; ++i) { |
buffer.validate(SkIsValidMode((SkXfermode::Mode)fModes[i])); |
} |