Forráskód Böngészése

修复 win7 兼容性问题

张富强 3 hónapja
szülő
commit
38263e8718
1 módosított fájl, 3 hozzáadás és 3 törlés
  1. 3 3
      file/api_windows.go

+ 3 - 3
file/api_windows.go

@@ -37,9 +37,9 @@ func readFileSize(fd uintptr, size int) []byte {
 }
 
 func writeFile(fd uintptr, buf []byte) bool {
-	j_len := len(buf)
-	if j_len < 1 {
+	if len(buf) < 1 {
 		return true
 	}
-	return yu_win.WriteFile.CallBool(fd, buf, j_len, 0, 0)
+	j_len := 0
+	return yu_win.WriteFile.CallBool(fd, buf, len(buf), &j_len, 0)
 }