Replace broken code

Or maybe it's undefined behavior in our C. Or maybe both. Either way,
it wasn't broken before, and now it is. So this fixes it.
pendulum 6.3.4