Fixed tokenlist.cpp for all versions. No crashes when input strings end in space.