git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit 7b74d04925fc2be0babc02e191f66a3653f83dd4

TestEnvironment: fixed hexStr2arrayBuf

Alex Beregszaszi committed on 8/16/2016, 10:26:03 PM
Parent: d0973468e86d175de7252854a6b36fd67495c3a4

Files changed

testEnvironment.jschanged
testEnvironment.jsView
@@ -51,10 +51,9 @@
5151 }
5252 }
5353
5454 function hexStr2arrayBuf (string) {
55- const ab = new ArrayBuffer(string.length / 2)
56- const view = new Uint8Array(ab)
55+ const view = new Uint8Array(string.length / 2)
5756 string = [...string]
5857 let temp = ''
5958 string.forEach((el, i) => {
6059 temp += el
@@ -62,6 +61,6 @@
6261 view[(i + 1) / 2 - 1] = parseInt(temp, 16)
6362 temp = ''
6463 }
6564 })
66- return ab
65+ return view
6766 }

Built with git-ssb-web