diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngPlteChunk.java')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngPlteChunk.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngPlteChunk.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngPlteChunk.java index a216966533..164530aead 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngPlteChunk.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngPlteChunk.java @@ -13,7 +13,6 @@ package org.eclipse.swt.internal.image; import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; -import org.eclipse.swt.internal.Compatibility; class PngPlteChunk extends PngChunk { @@ -106,7 +105,7 @@ void validate(PngFileReadState readState, PngIhdrChunk headerChunk) { // Palettes cannot have more entries than 2^bitDepth // where bitDepth is the bit depth of the image given // in the IHDR chunk. - if (Compatibility.pow2(headerChunk.getBitDepth()) < paletteSize) { + if (1 << headerChunk.getBitDepth() < paletteSize) { SWT.error(SWT.ERROR_INVALID_IMAGE); } |