Commit 56ef8820 authored by Deviantedh's avatar Deviantedh
Browse files

Применение правок 1.4

parent 50c0d6d6
No related merge requests found
Pipeline #120023 failed with stages
in 12 seconds
......@@ -4,10 +4,12 @@
typedef void (*transform_rule)(size_t* dest_x, size_t* dest_y, size_t src_x, size_t src_y, size_t width, size_t height);
static struct image create_image(size_t width, size_t height) {
struct image img = { .width = width, .height = height };
struct image create_image(uint32_t width, uint32_t height) {
struct image img;
img.width = width;
img.height = height;
img.data = malloc(width * height * sizeof(struct pixel));
if (img.data == NULL) {
if (!img.data) {
img.width = img.height = 0;
}
return img;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment