Make bytecode debugging with FontForge work again. * src/truetype/ttinterp.c (TT_RunIns): Don't call `free_buffer_in_size' in case of error if a debugger is active.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/ChangeLog b/ChangeLog
index 4b16516..ac0ad57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-09-15 Werner Lemberg <wl@gnu.org>
+
+ Make bytecode debugging with FontForge work again.
+
+ * src/truetype/ttinterp.c (TT_RunIns): Don't call
+ `free_buffer_in_size' in case of error if a debugger is active.
+
2010-09-14 Werner Lemberg <wl@gnu.org>
Improve tracing messages.
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index a3eeaa6..6401009 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -8162,13 +8162,15 @@
*exc = cur;
#endif
- /* if any errors, function tables may be broken. */
- /* it should not be used for next interpretation. */
- if ( CUR.error )
+ /* If any errors have occurred, function tables may be broken. */
+ /* Force a re-execution of `prep' and `fpgm' tables if no */
+ /* bytecode debugger is run. */
+ if ( CUR.error && !CUR.instruction_trap )
{
FT_TRACE1(( " The interpreter returned error 0x%x\n", CUR.error ));
free_buffer_in_size( exc );
- exc->size->cvt_ready = FALSE;
+
+ exc->size->cvt_ready = FALSE;
exc->size->bytecode_ready = FALSE;
}