Fix a buffer overflow. Thanks to Christoph for spotting this.