Correctly append to a fixed buffer while logging.
Merge pull request #241 from unknownbrackets/logging

Correctly append to a fixed buffer while logging
Merge https://github.com/hrydgard/native