Priest of the Order of the Butterfly
Joined: 2003/2/25
Posts: 534
From: France
Hello Carsten,
Just peaked a look at your code.
unsigned char path[100] = "";
strcat(path,dir);
strcat(path,file);
Please. Avoid such construction. if strlen(dir) + strlen(file) > 99, this code will simply trash what's after path array... The task stack will be messed up and can lead to a crash...
Do a proper memory allocation for that. A simple AllocVec(strlen(dir)+strlen(file)+1, MEMF_ANY) is good enough for the path array. Don't forget the FreeVec afterward.
Also, DOS library has functions for concatenating path together that worth a look at imo.
I have seen other issues here and there that worth fixes too.
In MuiMinMax method for example:
msg->MinMaxInfo->MaxWidth += 1280;
msg->MinMaxInfo->MaxHeight += 1024;
There is a MUI_MAXMAX define afair. This define allows 'unlimited' max size. Currently, this custom mui class will be limited to 1280x1024 screen resolution.
Kind regards,
Tcheko