[JW Lua] Finale crashes with finenv.UI():IsFontAvailable(...)

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Fri Nov 27 10:29:35 CET 2015


Jan,

Thanks for the report. It's the length of the font name that causes the 
crash. The Window API allows 32 characters max for the font name, and I 
didn't do any length check in FCUI:IsFontAvailable(). I'll fix this.


Best regards,

Jari Williamsson


On 2015-11-26 16:37, Jan Angermüller wrote:
> Jari,
>
> I noticed the a Finale crash on Finale 2014d/Windows 10 with the
> following code:
>
> local tempname=finale.FCString()
> tempname.LuaString="Century Schoolbook L ItalicItalic"
> print(finenv.UI():IsFontAvailable(tempname))
>
> A font with this name is (of course) not available and the font name
> with ItalicItalic at the end was only the result of a concatenation bug
> I had. But the resulting crash was rather unexpected.
> The script doesn't crash with any other silly font names. Probably you
> are doing any Bold/Italic string processing internally which doesn't
> expect two key words in a row.
>
> Jan
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>






More information about the JWLua mailing list