зеркало из https://github.com/mozilla/pluotsorbet.git
Fix handling of uncompressed JAR entries
The Uint8Array returned from zip.read is just an offset into the jar's array buffer. We need to properly use the byte length and offset when carving out a slice.
This commit is contained in:
Родитель
1896b6ab80
Коммит
fa5897b35b
|
@ -49,7 +49,7 @@ Classes.prototype.loadFile = function(fileName) {
|
|||
var zip = classfiles[name];
|
||||
if (fileName in zip.directory) {
|
||||
var bytes = zip.read(fileName);
|
||||
data = bytes.buffer.slice(0, bytes.length);
|
||||
data = bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);
|
||||
}
|
||||
return !data;
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче