@@ -5714,21 +5714,22 @@ sixel_builtin_load_stbi_path(
57145714}
57155715
57165716SIXELSTATUS
5717- load_with_builtin (
5718- sixel_chunk_t const * pchunk ,
5719- int fstatic ,
5720- int fuse_palette ,
5721- int reqcolors ,
5722- unsigned char * bgcolor ,
5723- int bgcolor_source ,
5724- int loop_control ,
5725- int start_frame_no_set ,
5726- int start_frame_no_override ,
5727- int enable_cms ,
5728- int bmp_info40_mode ,
5729- sixel_load_image_function fn_load ,
5730- void * context )
5717+ sixel_builtin_load_with_builtin_impl (
5718+ sixel_builtin_load_with_builtin_args_t const * args )
57315719{
5720+ sixel_chunk_t const * pchunk ;
5721+ int fstatic ;
5722+ int fuse_palette ;
5723+ int reqcolors ;
5724+ unsigned char * bgcolor ;
5725+ int bgcolor_source ;
5726+ int loop_control ;
5727+ int start_frame_no_set ;
5728+ int start_frame_no_override ;
5729+ int enable_cms ;
5730+ int bmp_info40_mode ;
5731+ sixel_load_image_function fn_load ;
5732+ void * context ;
57325733 SIXELSTATUS status ;
57335734 unsigned char * pixels ;
57345735 sixel_frame_t * frame ;
@@ -5752,11 +5753,27 @@ load_with_builtin(
57525753 int apply_start_frame ;
57535754 int pnm_pixelformat ;
57545755
5756+ if (args == NULL ) {
5757+ return SIXEL_BAD_ARGUMENT ;
5758+ }
5759+ pchunk = args -> pchunk ;
5760+ fstatic = args -> fstatic ;
5761+ fuse_palette = args -> fuse_palette ;
5762+ reqcolors = args -> reqcolors ;
5763+ bgcolor = args -> bgcolor ;
5764+ bgcolor_source = args -> bgcolor_source ;
5765+ loop_control = args -> loop_control ;
5766+ start_frame_no_set = args -> start_frame_no_set ;
5767+ start_frame_no_override = args -> start_frame_no_override ;
5768+ enable_cms = args -> enable_cms ;
5769+ bmp_info40_mode = args -> bmp_info40_mode ;
5770+ fn_load = args -> fn_load ;
5771+ context = args -> context ;
57555772 status = SIXEL_BAD_INPUT ;
57565773 pixels = NULL ;
57575774 frame = NULL ;
5758- stb_context = ( stbi__context ){ 0 } ;
5759- ri = ( stbi__result_info ){ 0 } ;
5775+ memset ( & stb_context , 0 , sizeof ( stb_context )) ;
5776+ memset ( & ri , 0 , sizeof ( ri )) ;
57605777 chunk_size = 0 ;
57615778 is_png = 0 ;
57625779 is_jpeg = 0 ;
0 commit comments