Explorar o código

endPage: read next packet if we are already at the end of the buffer

Corey Smith %!s(int64=4) %!d(string=hai) anos
pai
achega
dcdbeac267
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/backend.go

+ 3 - 0
src/backend.go

@@ -113,6 +113,9 @@ readPackets:
 					log.Println("Requesting next page...")
 					i += 1
 					sendPacket(socket, []byte(formats.nextPageRequest))
+					if i >= len(scanBytes) {
+						continue readPackets
+					}
 				} else if scanBytes[i] == scanner.startGray {
 					if i + 2 >= len(scanBytes) {
 						continue readPackets