SimTK::String::trimWhiteSpace() failed when applied to binary data.
SimTK::String::trimWhiteSpace() failed when applied to binary data.

VC++ 2013 std::isspace() (the C-compatible version that takes an int argument) has a bug catcher in Debug mode that objects to being passed an int value that is out of range for an unsigned char. If String::trimWhiteSpace() is called on a binary file, it can blow this check. Casting the char to unsigned char prior to calling isspace() fixes the problem.

I know it sounds absurd to trim white space on a binary file, but it came up while trying to read the contents of an .stl file to determine whether it is in ascii or binary format. It turned out to be binary!

chrisdembia/simbody,Gjacquenot/simbody,robojukie/simbody,scamille/simbody,robojukie/simbody,chrisdembia/simbody,elkingtonmcb/simbody,robojukie/simbody,scamille/simbody,simbody/simbody,elkingtonmcb/simbody,elkingtonmcb/simbody,simbody/simbody,Gjacquenot/simbody,chrisdembia/simbody,Gjacquenot/simbody,scamille/simbody