All pastes #809471 Raw Edit

Unbenannt

public text v1 · immutable
·published 2007-12-08 22:48 UTC
rendered paste body
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;