From d4ff53b760f51d791860b25385f2f9716740d586 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 9 Jul 2013 06:21:45 +0000 Subject: fix [#36066] crash when Tab out text object the way Curve.len is used at the moment is really stupid, calculate string size on save for now, but should really store the length in bytes and total number of characters. --- source/blender/makesdna/DNA_curve_types.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index deb9902c35d..964fa11b0a2 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -215,6 +215,10 @@ typedef struct Curve { void *lastsel; /* font part */ + /* WARNING: cu->len is... + * - strlen(cu->str) object-mode (bytes). + * - BLI_strlen_utf8(cu->str) in edit-mode. + * This should be cleaned up and some point, see 'write_curves' - campbell */ short len, lines, pos, spacemode; float spacing, linedist, shear, fsize, wordspace, ulpos, ulheight; float xof, yof; -- cgit v1.2.3