mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
properly handle bad input on windows clocks
This commit is contained in:
parent
2a30fc3f1b
commit
e989a86d33
@ -17,6 +17,7 @@ pub fn platform_clock_res_get(
|
|||||||
__WASI_CLOCK_THREAD_CPUTIME_ID => {
|
__WASI_CLOCK_THREAD_CPUTIME_ID => {
|
||||||
return __WASI_EINVAL;
|
return __WASI_EINVAL;
|
||||||
}
|
}
|
||||||
|
_ => return __WASI_EINVAL,
|
||||||
};
|
};
|
||||||
resolution.set(resolution_val);
|
resolution.set(resolution_val);
|
||||||
__WASI_ESUCCESS
|
__WASI_ESUCCESS
|
||||||
@ -47,6 +48,7 @@ pub fn platform_clock_time_get(
|
|||||||
__WASI_CLOCK_THREAD_CPUTIME_ID => {
|
__WASI_CLOCK_THREAD_CPUTIME_ID => {
|
||||||
unimplemented!("wasi::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);
|
time.set(nanos);
|
||||||
__WASI_ESUCCESS
|
__WASI_ESUCCESS
|
||||||
|
Loading…
Reference in New Issue
Block a user