Index: src/core/SkDescriptor.h |
diff --git a/src/core/SkDescriptor.h b/src/core/SkDescriptor.h |
index d550863568ef16e569c742d8fd50c099c1061537..22ec29316fd30094ed6ad36cff8150acde8808cd 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 |
} |