Fix a bug in the truncate() method: forget to initialize buffer if null.
Fix a bug in the truncate() method: forget to initialize buffer if null.

vcgato29/Central,Grummfy/Central,vcgato29/Central,Metalaka/Central,Metalaka/Central,Grummfy/Central