What is piggybacked ACK
The protocol will be incorrect. Suppose that 3-bit sequence numbers we are using. Consider following situation:
A just send frame 7.
B gets frame and sends a piggybacked ACK.
A gets ACK and sends frames 0-6, all of that get lost.
B times out and again transmits its current frame, with ACK 7.
Look at the situation at A when frame with r.ack = 7 arrive. The key variables are AckExpected = 0, r.ack = 7, and Next Frame to Send = 7. The modified among will return true, causing A to think lost frames were being acknowledged.