From afd89d309d696f9edd4a383d088cc6c05d00880b Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 15 Sep 2010 13:02:35 +0200 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ src/truetype/ttinterp.c | 10 ++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b16516d1..ac0ad57e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-09-15 Werner Lemberg + + 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 Improve tracing messages. diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c index a3eeaa69b..64010091e 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; }