2.5
[blender.git] / source / blender / blenkernel / intern / font.c
index c3cf6e06c0943e730409a346be102163c5312e33..60a7ffc28d9923ac14f2f9e84c0b088aff8d3855 100644 (file)
@@ -682,7 +682,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
                cu->ulheight = 0.05;
        
        if (cu->strinfo==NULL)  /* old file */
-               cu->strinfo = MEM_callocN((slen+1) * sizeof(CharInfo), "strinfo compat");
+               cu->strinfo = MEM_callocN((slen+4) * sizeof(CharInfo), "strinfo compat");
        
        custrinfo= cu->strinfo;
        if (cu->editfont)
@@ -1145,7 +1145,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
                if (cu->sepchar==0) {
                        for (i= 0; i<slen; i++) {
                                cha = (uintptr_t) mem[i];
-                               info = &(cu->strinfo[i]);
+                               info = &(custrinfo[i]);
                                if (info->mat_nr > (ob->totcol)) {
                                        /* printf("Error: Illegal material index (%d) in text object, setting to 0\n", info->mat_nr); */
                                        info->mat_nr = 0;