mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Windows: fix some heap corruptions, fix msvc not building with unicode flags, fix os.getwd, fix mscrazy using a less recent installation
This commit is contained in:
committed by
Alexander Medvednikov
parent
0bbefca875
commit
32aae80a64
@@ -703,9 +703,9 @@ pub fn chdir(path string) {
|
||||
|
||||
pub fn getwd() string {
|
||||
$if windows {
|
||||
max := 512 // MAX_PATH * sizeof(wchar_t)
|
||||
max := 1024 // MAX_PATH * sizeof(wchar_t)
|
||||
buf := &u16(malloc(max))
|
||||
if C._wgetcwd(buf, max) == 0 {
|
||||
if C._wgetcwd(buf, max/2) == 0 {
|
||||
return ''
|
||||
}
|
||||
return string_from_wide(buf)
|
||||
|
||||
Reference in New Issue
Block a user