diff --git a/code/application/source/sf_app/code/source/qrcodeMng/sf_bmp.c b/code/application/source/sf_app/code/source/qrcodeMng/sf_bmp.c index 580d6e26c..59866a066 100644 --- a/code/application/source/sf_app/code/source/qrcodeMng/sf_bmp.c +++ b/code/application/source/sf_app/code/source/qrcodeMng/sf_bmp.c @@ -155,18 +155,30 @@ void vd_g_SaveBitmap(const ST_BITMAP * st_ap_bitmap, const char * sz_ap_path) do { if(st_ap_bitmap == NULL) + { + printf("st_ap_bitmap failed.\n"); break; + } if((st_ap_bitmap->u2_bitcount != 16) && (st_ap_bitmap->u2_bitcount != 24) && (st_ap_bitmap->u2_bitcount != 32)) + { + printf("st_ap_bitmap failed 2.\n"); break; + } if(sz_ap_path == NULL) + { + printf("sz_ap_path failed.\n"); break; + } file_bitmap = fopen(sz_ap_path, "wb"); if(file_bitmap == NULL) + { + printf("fopen failed.\n"); break; - + } + printf("sz_ap_path = %s\n", sz_ap_path); // set bitmap head info vd_SerializeLittleEndianU4(&u1_tp_bitmap_header[2], sizeof(u1_tp_bitmap_header) + st_ap_bitmap->u4_image_size); vd_SerializeLittleEndianU4(&u1_tp_bitmap_header[10], sizeof(u1_tp_bitmap_header)); @@ -188,7 +200,7 @@ void vd_g_SaveBitmap(const ST_BITMAP * st_ap_bitmap, const char * sz_ap_path) } while(0); - + system("sync"); if(file_bitmap) fclose(file_bitmap); }