Index: third_party/ktx/ktx.cpp |
diff --git a/third_party/ktx/ktx.cpp b/third_party/ktx/ktx.cpp |
index 7cc2f28585cb853a2ed7f89d874c44ed9e746273..42b3ca119fa16d083c79d67c24b74441d9ff27d8 100644 |
--- a/third_party/ktx/ktx.cpp |
+++ b/third_party/ktx/ktx.cpp |
@@ -500,7 +500,7 @@ bool SkKTXFile::WriteBitmapToKTX(SkWStream* stream, const SkBitmap& bitmap) { |
size_t kvsize = kv->size(); |
kvsize += 4; |
kvsize = (kvsize + 3) & ~3; |
- hdr.fBytesOfKeyValueData += kvsize; |
+ hdr.fBytesOfKeyValueData = SkToU32(hdr.fBytesOfKeyValueData + kvsize); |
} |
// Write the header |