Index: font.cpp
===================================================================
--- font.cpp (revision 746237)
+++ font.cpp (working copy)
@@ -182,7 +182,7 @@
// For each letter in the text box, save the width of the character.
// When word-wise, only the first letter contains the width, but of the
// whole word.
- short* const widthList = (short *)alloca(to*sizeof(short));
+ short* const widthList = (short *)alloca((to+1)*sizeof(short));
// First pass: gather widths
int preSegmentWidth = 0;