diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkDescriptor.h | 4 | ||||
-rw-r--r-- | src/core/SkVarAlloc.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/SkDescriptor.h b/src/core/SkDescriptor.h index d550863568..22ec29316f 100644 --- a/src/core/SkDescriptor.h +++ b/src/core/SkDescriptor.h @@ -42,7 +42,7 @@ public: SkASSERT(SkAlign4(length) == length); SkASSERT(this->findEntry(tag, NULL) == NULL); - Entry* entry = (Entry*)((char*)this + fLength); + Entry* entry = (Entry*)((char*)this + fLength); entry->fTag = tag; entry->fLen = SkToU32(length); if (data) { @@ -50,7 +50,7 @@ public: } fCount += 1; - fLength += sizeof(Entry) + length; + fLength = SkToU32(fLength + sizeof(Entry) + length); return (entry + 1); // return its data } diff --git a/src/core/SkVarAlloc.h b/src/core/SkVarAlloc.h index 2e8f19c8fe..4031992721 100644 --- a/src/core/SkVarAlloc.h +++ b/src/core/SkVarAlloc.h @@ -19,7 +19,7 @@ public: char* ptr = fByte; fByte += bytes; - fRemaining -= bytes; + fRemaining = SkToU32(fRemaining - bytes); return ptr; } |