Skip to content

Commit 6b1c8b3

Browse files
committed
implements update(II)I
1 parent 04881e0 commit 6b1c8b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/de/inetsoftware/jwebassembly/api/java/util/zip/ReplacementForCRC32.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ class ReplacementForCRC32 {
2929
*/
3030
@Replace( "java/util/zip/CRC32.update(II)I" )
3131
static int update( int crc, int b ) {
32-
return 0; // for Java compiler
32+
crc ^= -1;
33+
crc = (crc >>> 8) ^ makeCRCTable()[(crc ^ b) & 0xFF];
34+
return crc ^ -1;
3335
}
3436

3537
/**

0 commit comments

Comments
 (0)