Apparently in all my test runs on Linux it happened to start off negative. But as soon as I tested on Windows, that initialised the memory to something unhelpful.