diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/main.go b/main.go index 36414d2..4700de6 100644 --- a/main.go +++ b/main.go @@ -24,6 +24,6 @@ func main() { } procSystemParamInfo := windows.NewLazyDLL("user32.dll").NewProc("SystemParametersInfoW") - imagePath, _ := windows.UTF16PtrFromString(string(fileBytes) + `\` + strconv.Itoa(rand.Intn(len(files))+1) + ".jpg") + imagePath, _ := windows.UTF16PtrFromString(string(fileBytes) + `\` + strconv.Itoa(rand.Intn(len(files)-1)+1) + ".jpg") procSystemParamInfo.Call(20, 0, uintptr(unsafe.Pointer(imagePath)), 0x001A) }