mono/mono — pull request #244 by konrad-kruczynski (2012-03-13 23:58:30+00:00)
Title: Variable holding number of written bytes is signed now.

Before that change the comparison t < 0 was always false,
therefore it was not able to detect error (resulting in possible
never ending loop).