Code: Select all
Debug CreateImage(0,4000, 32000) ; --> works
Debug CreateImage(0,4000, 32001) ; --> crash the program
Code: Select all
Debug CreateImage(0,4000, 32000) ; --> works
Debug CreateImage(0,4000, 32001) ; --> crash the program
Code: Select all
Procedure SafeCreateImage(hImg, width, height, depth, bgcolor)
If width > 32000 Or height > 32000: ProcedureReturn 0: EndIf
ProcedureReturn CreateImage(hImg, width, height, depth, bgcolor)
EndProcedure