Skip to content

Commit

Permalink
properly handle bad input on windows clocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark McCaskey committed May 21, 2019
1 parent 2a30fc3 commit e989a86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/wasi/src/syscalls/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub fn platform_clock_res_get(
__WASI_CLOCK_THREAD_CPUTIME_ID => {
return __WASI_EINVAL;
}
_ => return __WASI_EINVAL,
};
resolution.set(resolution_val);
__WASI_ESUCCESS
Expand Down Expand Up @@ -47,6 +48,7 @@ pub fn platform_clock_time_get(
__WASI_CLOCK_THREAD_CPUTIME_ID => {
unimplemented!("wasi::platform_clock_time_get(__WASI_CLOCK_THREAD_CPUTIME_ID, ..)")
}
_ => return __WASI_EINVAL,
};
time.set(nanos);
__WASI_ESUCCESS
Expand Down

0 comments on commit e989a86

Please sign in to comment.