txlyre 1 månad sedan
förälder
incheckning
720c974e71
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      main.go

+ 2 - 2
main.go

@@ -74,7 +74,7 @@ func processor(inQueue chan []byte, outQueue chan []byte) {
 		for _, chunk := range chunkBy(data, 8) {
 			var b byte = 0
 
-			for j := range 8 {
+			for j := 0; j < 8; j++ {
 				if chunk[j]&1 != 0 {
 					b |= (1 << (7 - j))
 				}
@@ -108,7 +108,7 @@ func main() {
 	flag.UintVar(&width, "width", 1280, "frame width")
 	flag.UintVar(&height, "height", 720, "frame height")
 	flag.UintVar(&bufferSize, "bufferSize", 1024, "sending queue max capacity")
-	flag.StringVar(&secret, "ident", "", "yebi.su ident")
+	flag.StringVar(&ident, "ident", "", "yebi.su ident")
 	flag.StringVar(&secret, "secret", "", "yebi.su secret")
 
 	flag.Parse()