Chromium Code Reviews| Index: src/core/SkWriter32.cpp |
| diff --git a/src/core/SkWriter32.cpp b/src/core/SkWriter32.cpp |
| index e41e2df0c470423c34d017bc51e324165d9ed19a..2a550f9e31e17887a1cf172f5aad86bdfcdd80f9 100644 |
| --- a/src/core/SkWriter32.cpp |
| +++ b/src/core/SkWriter32.cpp |
| @@ -246,12 +246,6 @@ void SkWriter32::validate() const { |
| const char* SkReader32::readString(size_t* outLen) { |
| size_t len = this->readInt(); |
| - if (0xFFFF == len) { |
| - if (outLen) { |
| - *outLen = 0; |
| - } |
| - return NULL; |
| - } |
| const void* ptr = this->peek(); |
| // skip over teh string + '\0' and then pad to a multiple of 4 |
| @@ -275,8 +269,7 @@ size_t SkReader32::readIntoString(SkString* copy) { |
| void SkWriter32::writeString(const char str[], size_t len) { |
| if (NULL == str) { |
| - // We're already requiring len < 0xFFFF, so we can use that to mark NULL. |
| - this->write32(0xFFFF); |
| + this->writeString(""); |
|
reed1
2013/08/12 17:05:47
since no 2nd parameter implies a call to strlen, e
mtklein
2013/08/12 17:20:04
Here's a third option, neither overkill nor unread
|
| return; |
| } |
| if ((long)len < 0) { |