From 272b0aec82dd206c81b9c2d07708b4101852f40f Mon Sep 17 00:00:00 2001 From: vitalyster Date: Sat, 26 Oct 2019 14:58:05 +0300 Subject: [PATCH] os: fix os.get_error_msg on Windows --- vlib/os/os_windows.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/os/os_windows.v b/vlib/os/os_windows.v index 032a0d97e5..9b691f5d94 100644 --- a/vlib/os/os_windows.v +++ b/vlib/os/os_windows.v @@ -185,5 +185,5 @@ pub fn get_error_msg(code int) string { if _ptr_text == 0 { // compare with null return '' } - return tos(_ptr_text, vstrlen(_ptr_text)) + return string_from_wide(_ptr_text) }