Fix undefined behavior in parsetok.c. Patch by Zackery Spytz.