tvg_saver: fix the invalid data size.

sizeof(colors) indicates its pointer size, we actually intended to the structure size.
This commit is contained in:
Hermet Park 2021-07-26 16:12:23 +09:00 committed by Hermet Park
parent 5e3011f86e
commit 30ebf35c13
2 changed files with 1 additions and 1 deletions

Binary file not shown.

View file

@ -198,7 +198,7 @@ TvgBinCounter TvgSaver::serializeFill(const Fill* fill, TvgBinTag tag)
if (auto flag = static_cast<TvgBinFlag>(fill->spread()))
cnt += writeTagProperty(TVG_TAG_FILL_FILLSPREAD, SIZE(TvgBinFlag), &flag);
cnt += writeTagProperty(TVG_TAG_FILL_COLORSTOPS, stopsCnt * sizeof(stops), stops);
cnt += writeTagProperty(TVG_TAG_FILL_COLORSTOPS, stopsCnt * sizeof(Fill::ColorStop), stops);
writeReservedCount(cnt);