Fixed the magic bug where it wouldnt recommended operations that resulted in lists of files

This commit is contained in:
n1073645 2019-12-13 16:09:02 +00:00
parent 798f013219
commit 86db43e6dd
4 changed files with 29 additions and 7 deletions

View file

@ -2947,7 +2947,7 @@ export function extractWAV(bytes, offset) {
stream.moveTo(4);
// Move to file size.
stream.moveTo(stream.readInt(4, "le") - 4);
stream.moveTo(stream.readInt(4, "le"));
return stream.carve();
}

View file

@ -403,7 +403,7 @@ class Magic {
await recipe.execute(dish);
// Return an empty buffer if the recipe did not run to completion
if (recipe.lastRunOp === recipe.opList[recipe.opList.length - 1]) {
return dish.get(Dish.ARRAY_BUFFER);
return await dish.get(Dish.ARRAY_BUFFER);
} else {
return new ArrayBuffer();
}