| 4975 | } |
| 4976 | |
| 4977 | static int stbi__check_png_header(stbi__context* s) { |
| 4978 | static const stbi_uc png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10}; |
| 4979 | int i; |
| 4980 | for (i = 0; i < 8; ++i) |
| 4981 | if (stbi__get8(s) != png_sig[i]) |
| 4982 | return stbi__err("bad png sig", "Not a PNG"); |
| 4983 | return 1; |
| 4984 | } |
| 4985 | |
| 4986 | typedef struct { |
| 4987 | stbi__context* s; |
no test coverage detected