Re: Font Problems
- From: Eric Mader <mader jtcsv com>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-i18n-list gnome org
- Subject: Re: Font Problems
- Date: Thu, 29 Aug 2002 09:38:46 -0700
At 08:43 AM 8/29/2002, Owen Taylor wrote:
Looks good to commit, except that:
> cur_offset = FILE_Pos();
> - if ( FILE_Seek( new_offset ) ||
> - ( error = Load_Script( &sr[n].Script, stream ) ) != TT_Err_Ok )
> - goto Fail;
> +
> + if ( FILE_Seek( new_offset ) )
> + goto Fail;
> +
> + error = Load_Script( &sr[sl->ScriptCount].Script, stream );
> + if ( error != TT_Err_Ok && error != TTO_Err_Empty_Script )
> + goto Fail;
> +
> + sl->ScriptCount += 1;
> +
> (void)FILE_Seek( cur_offset );
> }
Don't you only want to increment sl->ScriptCount if
error != TT_Err_Empty_Script?
Thanks,
Owen
Ooops! You're right. This logic is a bit nastier than I was expecting...
The obvious fix is to put another if in front of the increment, but that
seems like an awful lot of testing. I'll think about this a bit and see if
I can come up with a better way. Maybe a switch on error?
Regards,
Eric
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]