tidy bug?
"Hermann Haslauer" <[email protected]>
| Newsgroups | gmane.comp.web.html-tidy.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi!
I found a small bug when tify was compiled with
TIDY_STORE_ORIGINAL_TEXT
in function "ReadChar" near line 178
The code
if ( in->pushed )
return PopChar( in );
returns a pushed char, but there are cases
where "in->otextbuf" is NULL at that moment, so this
popped char gets lost in the "original text" buffer.
Changing this to
if ( in->pushed )
{
tchar c = PopChar( in );
#ifdef TIDY_STORE_ORIGINAL_TEXT
if( in->otextbuf == NULL )
{
added = yes;
AddCharToOriginalText(in, (tchar)c);
}
#endif
return c;
}
seems to work.
best regards
Hermann
___________________________________
Dipl.Ing. Haslauer Hermann
SIGMATEK GmbH & Co KG
Bürmooserstraße 10
A-5112 Lamprechtshausen
Tel.: +43 6274 4321 258
Fax.: +43 6274 4321 18
Mail: [email protected]
*************************** Please note: *****************************
This email and all attachments are confidential and intended solely for
the person or entity to whom it is addressed. If you are not the named
addressee you must not make this email and all attachments accessible
to any other person. If you have received this email in error please
delete it together with all attachments.
**********************************************************************
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click