Fix comment about palette pointer alignment

This commit is contained in:
Nigel Tao committed 2018-09-08 11:21:40 +10:00
1 parent 5894b9448c
commit 399a7af6ef
3 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -1950,8 +1950,8 @@ wuffs_base__pixel_buffer__set_from_slice(wuffs_base__pixel_buffer* b,
if (wuffs_base__pixel_format__is_indexed(pixcfg->private_impl.pixfmt)) {
// Split a 1024 byte chunk (256 palette entries × 4 bytes per entry) from
// the start of pixbuf_memory. We split from the start, not the end, so
// that the remaining ptr has the same alignment as the original ptr, up to
// an alignment of 1024.
// that the both chunks' pointers have the same alignment as the original
// pointer, up to an alignment of 1024.
if (len < 1024) {
return wuffs_base__error__bad_argument_length_too_short;
}