Fix recent space skipping: 1) add missing (unsigned char) cast to ctype() macro 2) fix off-by-one error causing last letter always doubled
Fix recent space skipping:
1) add missing (unsigned char) cast to ctype() macro
2) fix off-by-one error causing last letter always doubled

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