You're reading a byte value into an int variable. If it was an signed value you'd get signed extension so your 0xFF from EEPROM would be stored as signed int 0xFFFF; your high/low byte combination code would then crash and burn. Since you're using an unsigned value you won't get sign extension so the 0xFF you read would be stored as 0x00FF; this means it fails your comparison against 0xFFFF.