[GEM Development] Desktop.inf

Ben A L Jemmett ben at jemmett.me.uk
Tue Nov 20 14:46:29 PST 2018


Hi Armand,

Yes, that sounds right - the Desktop internally reads these into a list of ANODE structures, and it only allocates room for 64 of them.  It’s been many years since I last took a look at the details but if you need more, you should be able to alter the NUM_ANODES value defined in DESKAPP.H and rebuild the Desktop from source.  

Taking a quick glance at the code in DESKAPP.C that handles finding the next free node, it doesn’t appear to check if it ran off the end of the list, which is unfortunate; I’m surprised it doesn’t crash in spectacular fashion after the 65th or 66th node!  It’s not quite as simple as a missing bounds check because it sets the pre-allocated array of structs up as a linked list and they can get shuffled around as nodes are allocated and freed, but that does mean it would in theory be possible to have the list grow dynamically if needed.  Regardless of the details, though, it would be nice to at least check the return value of the app_alloc() calls in app_start() to handle this more gracefully!

Regards,
Ben A L Jemmett
http://flatpack.microwavepizza.co.uk/

> On 20 Nov 2018, at 21:55, Armand Colleye <armand.colleye at planet.nl> wrote:
> 
> Hi all,
> 
> 
> Is within desktop.inf a limit of 64 entries?
> 
> All the icons get messed up when I reach 64 entries.
> -- 
> 
> Met vriendelijke groet,
> With kind regards,
> 
> 
> Armand Colleye
> 
> 
> _______________________________________________
> gem-dev mailing list
> gem-dev at simpits.org
> http://www.simpits.org/mailman/listinfo/gem-dev



More information about the gem-dev mailing list