Skip to content

Commit

Permalink
Again bug fix in Appstart
Browse files Browse the repository at this point in the history
  • Loading branch information
martenrichter committed Dec 29, 2024
1 parent b83837e commit 440d848
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export class Container extends Sink {
// now the sha
let dest = 36 // 36-67
for (let i = 0; i < 32 * 2; i += 2) {
dataview.setUint8(dest, parseInt(id.substr(i, 2), 16))
dataview.setUint8(dest, parseInt(sha.substr(i, 2), 16))
dest++
}
// parse uuid
Expand Down Expand Up @@ -850,18 +850,16 @@ export class MemContainer extends Container {
let src = 36 // 36-67
for (let i = 0; i < 32 * 2; i += 2) {
const number = dataview.getUint8(pos + src)
let str = number.toString(16).padStart(2, '0')
if (str.length === 1) str = '0' + str
sha += str
sha += number.toString(16).padStart(2, '0')
src++
}
// now the uuid
src = 68 // 65-84
src = 68 // 68-83
let appid = ''
for (let i = 0; i < 32; i += 2) {
const number = dataview.getUint8(pos + src)
appid += number.toString(16).padStart(2, '0')
if (i === 3 || i === 5 || i === 7 || i === 9) appid += '-'
if (i === 6 || i === 10 || i === 14 || i === 18) appid += '-'
src++
}
datasink.startApp(
Expand Down

0 comments on commit 440d848

Please sign in to comment.