Skip to content

Commit

Permalink
fix(stdlib): Return proper values from getClockTime for Sys/Time (#705)
Browse files Browse the repository at this point in the history
It was overwriting the number tag.
  • Loading branch information
cician committed Jun 6, 2021
1 parent 13b01c9 commit cab0ce7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/sys/time.gr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { allocateInt64, tagSimpleNumber } from "runtime/dataStructures"

let getClockTime = (clockid, precision) => {
let int64Ptr = allocateInt64()
let timePtr = int64Ptr + 4n
let timePtr = int64Ptr + 8n
let err = Wasi.clock_time_get(clockid, precision, timePtr)
if (err != Wasi._ESUCCESS) {
Memory.free(int64Ptr)
Expand Down

0 comments on commit cab0ce7

Please sign in to comment.