Fixing warning C4146: unary minus operator applied to unsigned type, result still unsigned

Making compiler happy
Shouldn't this be ssize_t instead of long?