Index: src/images/SkKTXImageEncoder.cpp |
diff --git a/src/images/SkKTXImageEncoder.cpp b/src/images/SkKTXImageEncoder.cpp |
index 5dc347ad66ff6c5c8bc406ead18d5b89e597447d..4b318a240c4ce6a764670d5736dfcdd7a631b35a 100644 |
--- a/src/images/SkKTXImageEncoder.cpp |
+++ b/src/images/SkKTXImageEncoder.cpp |
@@ -56,7 +56,7 @@ bool SkKTXImageEncoder::onEncode(SkWStream* stream, const SkBitmap& bitmap, int) |
} |
// Is it a KTX file?? |
- if (SkKTXFile::is_ktx(bytes)) { |
+ if (SkKTXFile::is_ktx(bytes, data->size())) { |
return stream->write(bytes, data->size()); |
} |