Don't get stuck in an infinite loop comparing (short++ <= maxshort)
Don't get stuck in an infinite loop comparing (short++ <= maxshort)

PR:		136893
Submitted by:	Aragon Gouveia - aragon at phat dot za dot net (mostly)
Approved by:	re (kib)
MFC after:	3 weeks

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase