eGUI icon indicating copy to clipboard operation
eGUI copied to clipboard

Problem in D4D_ExtFntSetWorkPath

Open faghio opened this issue 10 years ago • 3 comments

I think there is an issue on line 234 of d4d_font.c. The following code:

#ifdef D4D_UNICODE
        while((pFntDesc != NULL) && (pFntDesc - d4d_FontTableRam[i].pFontDescriptor) <= fileSize)
        {
#endif

should be changed into:

#ifdef D4D_UNICODE
        while((pFntDesc != NULL) && ((LWord)pFntDesc - (LWord)d4d_FontTableRam[i].pFontDescriptor) <= fileSize)
        {
#endif

In order to compare the same quantities. We have had a case where while loop was aborted before reaching the last page (with arm gcc).

Thanks

faghio avatar Jun 05 '15 13:06 faghio

Hi.

Could you do test with this fix:

#ifdef D4D_UNICODE while((pFntDesc != NULL) && ((void_)pFntDesc - (void_)d4d_FontTableRam[i].pFontDescriptor) <= fileSize) { #endif

Thank you

Gargy007 avatar Jun 08 '15 04:06 Gargy007

Obviously you meant (void *): tested and works.

faghio avatar Jun 08 '15 14:06 faghio

Thank you, bugfix is implemented right now on GitHub.

Petr

2015-06-08 16:40 GMT+02:00 faghio [email protected]:

Obviously you meant (void *): tested and works.

— Reply to this email directly or view it on GitHub https://github.com/Gargy007/eGUI/issues/14#issuecomment-110018249.

Gargy007 avatar Jun 08 '15 19:06 Gargy007