Skip to content

Commit

Permalink
SubInspector: fix hashing.
Browse files Browse the repository at this point in the history
Offscreen pixels can affect the bitmap alignment, so hashing chunks is
not valid.
  • Loading branch information
torque committed Apr 13, 2015
1 parent b6f3a77 commit 931377c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SubInspector.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,10 @@ static uint8_t checkBounds( ASS_Image *assImage, SI_InternalRect *boundsRect, ui

while ( chunk < endChunk ) {
if ( *chunk ) {
*pixelHash = crc32( *pixelHash, (void *)chunk, chunkSize );
// printf( "Chunk: %p; Value: %016lX, End: %p\n", chunk, *chunk, chunk + 1 );
for( byte = (uint8_t *)chunk; byte < (uint8_t *)(chunk + 1); byte++ ) {
if ( *byte ) {
*pixelHash = crc32( *pixelHash, (void *)byte, 1 );
if ( *byte == 255 ) {
solid = 1;
}
Expand Down

0 comments on commit 931377c

Please sign in to comment.