elusive bug fix

Hi!

Quick bug fix in collapse_zero():

There's a *(buf-1) being written to which can get called when buf points to the first character (if buf-2 happens to be ':' and buf-1 happens to be '0') = segmentation fault.

This is a very unfortunate coincidence. This has been happening in my project, so I did this bug fix which handled the issue.

Best, Andras