Przeglądaj źródła

Initialize the `.version` field correctly

It must be set to PNG_IMAGE_VERSION, which seems to be one, currently.
Lucas Stadler 10 lat temu
rodzic
commit
3943b76f19
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      rust/coffi/src/main.rs

+ 1 - 0
rust/coffi/src/main.rs

@ -42,6 +42,7 @@ fn main() {
42 42
43 43
    unsafe {
44 44
        let mut img: png_image = std::mem::zeroed();
45
        img.version = 1;
45 46
        print_img(&img);
46 47
        let res = png_image_begin_read_from_file(&mut img, "mei.png\0".as_ptr());
47 48
        println!("read_from_file: {}", res);