From 467d7e2c0b086ef7429f433eb95e6153aaeee511 Mon Sep 17 00:00:00 2001 From: Xamora Date: Sun, 20 Sep 2026 06:23:23 +0200 Subject: [PATCH] remove useless flag in Makefile, patch one test --- Makefile | 2 +- main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7c8b8f0..fcc6229 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ CC := gcc AS := nasm ASFLAGS := -g -f elf64 -I src/ -CFLAGS := -g -Wall -Wextra -Wno-override-init -std=c2x -fPIC -fPIE +CFLAGS := -g -Wall -Wextra -std=c2x MAIN := $(wildcard *.c) SRC := $(wildcard src/*.s) OBJ_DIR := build diff --git a/main.c b/main.c index 475d624..4ba77b6 100644 --- a/main.c +++ b/main.c @@ -181,7 +181,7 @@ test_calloc() { char *normal = ft_calloc(10, 1); // return "" printf("normal: %s_%p\n", normal, normal); - for (int i = 0; i <= 10; i++) + for (int i = 0; i < 10; i++) printf("'%b' ", normal[i]); printf("\n"); @@ -208,7 +208,7 @@ test_calloc() { char *normal = ft_calloc(10, 1); printf("normal: %s_%p\n", normal, normal); - for (int i = 0; i <= 10; i++) + for (int i = 0; i < 10; i++) printf("'%b' ", normal[i]); printf("\n");