hub/sagas: fix handleDownloadAndRun slicing

Some of the math was assuming i was incremented with ++ instead += chunkSize.
This commit is contained in:
David Lechner
2022-10-17 11:16:28 -05:00
committed by David Lechner
parent 960a3163ed
commit 06b204dd53
+2 -4
View File
@@ -247,12 +247,10 @@ function* handleDownloadAndRun(action: ReturnType<typeof downloadAndRun>): Gener
const writeUserRamMessageId = nextMessageId();
const data = yield* call(() =>
didCompile.file.slice(i * chunkSize, (i + 1) * chunkSize).arrayBuffer(),
didCompile.file.slice(i, i + chunkSize).arrayBuffer(),
);
yield* put(
sendWriteUserRamCommand(writeUserRamMessageId, i * chunkSize, data),
);
yield* put(sendWriteUserRamCommand(writeUserRamMessageId, i, data));
const { didFailToSend } = yield* race({
didSend: take(